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

Run without write access to source directory #372

Open
phemmer opened this issue Feb 24, 2025 · 0 comments
Open

Run without write access to source directory #372

phemmer opened this issue Feb 24, 2025 · 0 comments

Comments

@phemmer
Copy link

phemmer commented Feb 24, 2025

New user to repomix, and was testing with the docker image. It appears the application cannot run without write access to the source directory, even if the output file is specified to go elsewhere.

For example:

# mkdir /tmp/source

# echo hello > /tmp/source/world

# mkdir /tmp/out

# podman run -v /tmp/source:/app:ro -v /tmp/out:/out -t --rm ghcr.io/yamadashy/repomix -o /out/repomix                   

📦 Repomix v0.2.29

No custom config found at repomix.config.json or global config at /root/.config/repomix/repomix.config.json.
You can add a config file for additional settings. Please check https://github.com/yamadashy/repomix for more information.
✖ Error during packing
Unexpected error: Cannot access directory /app: undefined
For more help, please visit: https://github.com/yamadashy/repomix/issues

If you take the :ro flag off the volume mount it works, even though output has been redirected somewhere else. I'm not sure if it's trying to use the source directory as a temporary working directory or what. But IMHO it shouldn't be putting anything in it. Any temporary files should either go in the directory of the output file, $XDG_RUNTIME_DIR, or /tmp/.

Might also help if the error message would a little clearer. It took me a minute to figure out what the issue was, when the directory was there, readable, and not being used for output.

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

1 participant