package cli

// ProcessDirNameForBillyFS processes the given directory name for use with
// go-billy filesystems.
func ProcessDirNameForBillyFS(dir string) string {
	// remove trailing / from dir. This doesn't play well with
	// the go-billy filesystem and walker we use.
	if dir[len(dir)-1] == '/' {
		return dir[:len(dir)-1]
	}

	return dir
}
