Reliance on bash `rm` command breaks Windows
See original GitHub issueThe use of rm -fr lib/
as the first step within the test
script of generated projects breaks on Windows. Whilst it is possible to work around this with some hackery (e.g. defining a different test script and using that), it would be nice to strip out the OS dependency.
I think the issue is here:
We could do something like use https://github.com/shelljs/shx as a way of using portable Shell commands (I’m sure others may think of other options). Are there any objections to doing this please? If so, does the library get declared as a dependency of Projen, or a peer dependency?
I’m happy to submit a PR, but I want to make sure others are happy with this approach before I do.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to run rm command on windows 10? - Stack Overflow
In order to run bash commands on Windows you need to install Bash complied for Windows. Install Cygwin and add bin directory to...
Read more >Troubleshoot Start menu errors - Windows Client
Learn how to troubleshoot common Start menu errors in Windows 10. For example, learn to troubleshoot errors related to deployment, crashes, ...
Read more >Text-Based Commands - Cornell Computer Science
... need to learn how to use your command shell. Command shells are operating system dependent. ... In Windows, the command shell is...
Read more >Docker Compose release notes | Docker Documentation
Fixed the depends_on dependency recreation behavior. Fixed bash completion for the docker-compose build --memory command. Fixed the misleading environmental ...
Read more >Windows Batch Scripting - Wikibooks
This book describes and shows how to use the Microsoft-supplied command interpreter cmd.exe and the associated commands, and how to write Windows batch ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, the reason I went with shx in #540 was because there are other breaking commands other than
rm
that are used with Projen, such asmv
andmkdir
.I have the same issue on Windows with rm -fr. From my side the proposition is to use rimraf and have it as a global dependency for projen.