go-debos / debos

Debian OS builder
Apache License 2.0
542 stars 139 forks source link

actions: run: Set postprocess working directory to artifact directory #433

Open obbardc opened 1 year ago

obbardc commented 1 year ago

Currently any run action tagged as postprocess will be ran in the recipe directory. The artifacts are stored in this directory by default, unless --artifactdir is passed to Debos to change where the artifacts are stored.

The run action documentation states:

postprocess -- if set script or command is executed after all other commands and has access to the recipe directory ($RECIPEDIR) and the artifact directory ($ARTIFACTDIR). The working directory will be set to the artifact directory.

But this is wrong; currently the working directory of postprocess commands is set to the recipe directory. Set the working directory to the artifact directory instead to allow postprocess commands to be ran in the correct location.

Fixes: https://github.com/go-debos/debos/issues/345

evelikov commented 1 year ago

Adding the reproducer (or variant thereof) as a test case would be great.