-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brace expansion #1
Comments
I'm pretty sure exec.Command doesn't do any interpretation of the arguments; you'll have to do the expansion manually. |
Remove mkdir -p in favor of os.MkdirAll
@mholt Hey - thanks for the tip! I wonder if the following would work then 🤔 -- exec.Command("mkdir", "-p", "foo/", "{", "bar", ",", "baz", "}") Anyways, ended up building a list of all paths and using os.MkdirAll / os.Create to do this (b0967e9) - thanks again! Edit: never mind, that doesn't work, I really don't know why I thought it would. 😅 |
Wording, remove #1 note, change config -> template
Wording, remove #1 note, change config -> template
Wording, remove #1 note, change config -> template
For some reason, brace expansion isn't working with
exec.Command
. Right now, I'm just printing themkdir
andtouch
commands, so they can still be copied/pasted and run, but it'd be definitely huge to get this working so we can just build the full directory without having to run any extra commands manually.What's happening is that the script is interpreting the brackets as strings, so it's creating directories with braces in the names, rather than using the braces to determine structure.
The text was updated successfully, but these errors were encountered: