cordova-cli
cordova-cli copied to clipboard
Template directory on read-only filesystem makes cordova crash
Hey! I've been trying to use cordova for a few hours, and am hitting a small issue.
Anyway, thank you for all the work you put into it!
Bug Report
Problem
What is expected to happen?
If the template directory of cordova is on a read-only filesystem, I expect cordova create
or cordova platform add
to work and chmod the files so that they become read-writable by me
What does actually happen?
Instead, cordova doesn't chmod the files, then tries to write to them and errors out.
Information
I'm using NixOS, and this is the reason why my template directory is on a read-only filesystem: cordova as a whole is on a read-only filesystem. So the reproducer will be using nix, that can that said be installed on other OSes too.
This is easy to work around for cordova create
, but cordova platform add
is a bit harder to work around. The repro is also more complex so I'm not writing it down, but it should be the same fix anyway: after copying from a template directory cordova would need to chmod u+w the files
Command or Code
Reproducer:
[/tmp]$ nix-shell -I channel:nixos-unstable -p nodePackages.cordova
[nix-shell:/tmp]$ cordova create test
Creating a new cordova project.
EACCES: permission denied, open '/tmp/test/config.xml'
Environment, Platform, Device
Running cordova create on NixOS.
Version information
Cordova CLI 11.0.0
Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above