Closed pickledish closed 1 year ago
Hi @pickledish, thank you for opening this issue. Unless I'm misunderstanding, this is the intended behavior and highlights one of the key differences between mount_paths
and input_paths
: mount_paths
just exposes the host file system to the container, and any changes made by containers to mounted paths (such as deleting directories) are persisted between runs. However, you can also use the mount_readonly
toastfile option if you want to disallow changes to the host file system. With input_paths
, the container is operating on a copy of the files from the host, so the files on the host are unaffected by whatever happens inside the container.
Description
One task
A
creates a directory in a container, then a later taskB
which depends onA
, when usingmount_paths
, can remove that directory. I've tested and the same does not happen withinput_paths
.Instructions to reproduce the bug
Here is my Toast file. The
package.json
contains Vite and some other stuff:When trying to use
toast dev
, the command fails (vite is not found), and getting a shell into the container I found that thenode_modules
directory that had been created by thedeps
task was gone. Replacingmount_paths
withinput_paths
in the above example, changing nothing else, fixes the problem (thenode_modules
dir exists and vite etc can be used).Environment information:
Might this be because mounting
.
of the host to/scratch
inside the container overrides all existing contents in/scratch
? This would be a surprising difference between the behaviors ofmount_paths
andinput_paths
("for each file in this directory, copy the file into the container") which otherwise look and work the same. Anyway, if this behavior is intended, then feel free to close the issue, thanks!