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

fix: some tasks fail on Windows due to missing shell commands #781

Merged
merged 7 commits into from
May 16, 2021

Conversation

bracki
Copy link
Contributor

@bracki bracki commented May 12, 2021

This PR tries to address #452 by wrapping the commands 'rm', 'mkdir' and 'mv' with shx.
A whitelist of commands is maintained in the task runtime.

@eladb Is this what you had in mind when commenting on #540?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

src/tasks/runtime.ts Outdated Show resolved Hide resolved
@bracki
Copy link
Contributor Author

bracki commented May 12, 2021

@eladb I also tried to "refactor" by extracting the code, but it becomes gnarly so I'd rather let it be the way it is.

src/tasks/runtime.ts Outdated Show resolved Hide resolved
@eladb eladb changed the title Preliminary support for shell commands on Windows fix: some tasks fail on Windows due to missing shell commands May 12, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 13, 2021

Codecov Report

Merging #781 (c2fe968) into main (377966e) will increase coverage by 4.20%.
The diff coverage is 66.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #781      +/-   ##
==========================================
+ Coverage   78.46%   82.67%   +4.20%     
==========================================
  Files          88       96       +8     
  Lines        3181     3544     +363     
  Branches      809      793      -16     
==========================================
+ Hits         2496     2930     +434     
+ Misses        683      612      -71     
  Partials        2        2              
Impacted Files Coverage Δ
src/cdk8s-app-ts.ts 91.89% <ø> (ø)
src/cdk8s-construct.ts 33.33% <ø> (ø)
src/java/pom.ts 93.84% <ø> (ø)
src/tasks/runtime.ts 15.53% <7.14%> (-0.78%) ⬇️
src/typescript/projenrc.ts 17.14% <17.14%> (ø)
src/javascript/render-options.ts 20.25% <20.25%> (ø)
src/javascript/projenrc.ts 54.83% <54.83%> (ø)
src/github/mergify.ts 91.66% <75.00%> (-8.34%) ⬇️
src/node-package.ts 71.00% <76.47%> (+3.28%) ⬆️
src/typescript-config.ts 84.00% <84.00%> (ø)
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a12d696...c2fe968. Read the comment docs.

@bracki
Copy link
Contributor Author

bracki commented May 13, 2021

Oh man, this extremely frustrating.
Basically got hit by
#498 after applying the change from #540 (comment).

We ditched projen because we are on a mixed team with mostly Windows developers. Overall kind of sad, because projen would help so much, especially inexperienced TypeScript/Javascript folks on Windows.

@mergify mergify bot merged commit f187119 into projen:main May 16, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants