We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In a pipe.Script context, my expectation is that every step runs sequentially, where earlier steps complete before later steps start.
pipe.Script
I discovered that a few functions like pipe.MkDirAll run instantly, irrespective of their position in the pipe.Script.
pipe.MkDirAll
For example:
pipe.Script( pipe.System("sleep 2 && test ! -d newdir"), // wait then fail. pipe.MkDirAll("newdir/subdir", 0755), // runs before first step completes ),
If my understanding is correct, it looks like this behavior could be changed by using a TaskFunc in the implementation of MkDirAll.
TaskFunc
MkDirAll
func syncMkDirAll(dir string, perm os.FileMode) pipe.Pipe { return pipe.TaskFunc(func(s *pipe.State) error { return os.MkdirAll(s.Path(dir), perm) }) }
What do you think of making MkDir* a TaskFunc by default?
MkDir*
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In a
pipe.Script
context, my expectation is that every step runs sequentially, where earlier steps complete before later steps start.I discovered that a few functions like
pipe.MkDirAll
run instantly, irrespective of their position in thepipe.Script
.For example:
If my understanding is correct, it looks like this behavior could be changed by using a
TaskFunc
in the implementation ofMkDirAll
.For example:
What do you think of making
MkDir*
aTaskFunc
by default?Thanks!
The text was updated successfully, but these errors were encountered: