Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Use cross-spawn to fix spaces in install path in v2 #961

Merged
merged 4 commits into from
Mar 23, 2023
Merged

Conversation

awharn
Copy link
Member

@awharn awharn commented Mar 22, 2023

No description provided.

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
const spawnError = new Error("Pretend this was thrown by spawnSync");
const isDirSpy = jest.spyOn(childProc, "spawnSync").mockImplementation(() => {
const isDirSpy = jest.spyOn(spawn, "sync").mockImplementation(() => {

Check notice

Code scanning / CodeQL

Unused variable, import, function or class

Unused variable isDirSpy.
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (c54a4b9) 89.51% compared to head (b9095bb) 89.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #961      +/-   ##
==========================================
+ Coverage   89.51%   89.52%   +0.01%     
==========================================
  Files         207      207              
  Lines       11259    11259              
  Branches     2507     2507              
==========================================
+ Hits        10078    10080       +2     
+ Misses       1181     1179       -2     
Impacted Files Coverage Δ
...s/imperative/src/config/cmd/report-env/EnvQuery.ts 96.09% <100.00%> (ø)
packages/utilities/src/ProcessUtils.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @awharn!

Should we create an issue to update other places where child_process.spawn is used in the future? For example, ProcessUtils.openInEditor could fail if the file path includes a space.

@awharn
Copy link
Member Author

awharn commented Mar 23, 2023

LGTM, thanks @awharn!

Should we create an issue to update other places where child_process.spawn is used in the future? For example, ProcessUtils.openInEditor could fail if the file path includes a space.

It might make sense to fix that now too.

Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@awharn awharn merged commit 0d5de4c into master Mar 23, 2023
@awharn awharn deleted the fix-spawn-windows branch March 23, 2023 14:29
@awharn awharn added the release-patch Indicates a patch to existing code has been applied label Mar 23, 2023
@github-actions
Copy link

Release succeeded for the master branch. 🎉

The following packages have been published:

  • npm: @zowe/imperative@5.9.3

Powered by Octorelease 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-patch Indicates a patch to existing code has been applied released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants