cirruslabs / cirrus-ci-agent

Agent to execute Cirrus CI tasks
Mozilla Public License 2.0
13 stars 6 forks source link

Make os.Chdir(workingDir) error fatal #291

Closed edigaryev closed 1 year ago

edigaryev commented 1 year ago

This allows for earlier error detection, since it's very unlikely that any command will ever run after os.Chdir() fails, because do this for every command:

https://github.com/cirruslabs/cirrus-ci-agent/blob/6093bc7d29d70960aca57f9852a541b2e4c8ff4d/internal/executor/shell.go#L149

See also https://github.com/cirruslabs/cirrus-cli/issues/620#issuecomment-1556779772.