Skip to content
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

Tasks: support specifying cwd both at the task level and at the exec() level #358

Closed
eladb opened this issue Dec 9, 2020 · 4 comments
Closed

Comments

@eladb
Copy link
Contributor

eladb commented Dec 9, 2020

No description provided.

@eladb
Copy link
Contributor Author

eladb commented Dec 11, 2020

@pgollucci Want to pick this one?

@pgollucci
Copy link
Contributor

Something like this?

Task Level

task.cwd('foo');
task.exec('ls');
task.exec('echo bar');

results in

(cd foo ; ls)
(cd foo; echo bar)

exec() level

task.exec('ls', 'foo');

results in

(cd foo ; ls)

other

  • where exec() would override the task if set at Task level
  • if exec() dir is unset it would check Task, use if set otherwise plain

@pgollucci
Copy link
Contributor

pgollucci commented Dec 12, 2020

Give #356 That API won't work for exec()

task.exec("ls", {
  args?: [],
  cwd?: foo,
});

@eladb
Copy link
Contributor Author

eladb commented Dec 15, 2020

Give #356 That API won't work for exec()

task.exec("ls", {
  args?: [],
  cwd?: foo,
});

Yes that's what I had in mind.

And also support at the Task level so it applies to all commands (unless they override):

p.addTask('foo', {
  cwd: 'relative/sir'
});

@eladb eladb closed this as completed in 08c08d3 Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants