Draft
Conversation
in set command parameter value read from %~p* parameter extension needed to be quoted to avoid special characters from path breaking command
Author
|
It seems snapshots need to be regenerated |
Author
|
It seems tests still fail: PASS test/to-batch-syntax-tests.js 12 OK 19.984ms
FAIL test/basic.js
✖ expect rejected Promise
test/basic.js
.resolve(fixtures, 'from.env')
th.resolve(fixtures, 'from.env/a/b/c')
53 | return t.rejects(cmdShim(from, to), { code: /^(ENOTDIR|EEXIST)$/ })
| -----------^
t => {
--- expected
+++ actual
@@ -1,3 +1,3 @@
Error: ENOENT: no such file or directory, open 'D:\CODE\cmd-shim\test\fixtures\from.env\a\b\c.ps1' {
- "code": /^(ENOTDIR|EEXIST)$/,
+ "code": "ENOENT",
}
FAIL test/basic.js 1 failed of 30 154.481ms
✖ expect rejected Promise
🌈 SUMMARY RESULTS 🌈
FAIL test/basic.js 1 failed of 30 154.481ms
✖ expect rejected Promise
Suites: 1 failed, 1 passed, 2 of 2 completed
Asserts: 1 failed, 41 passed, of 42
Time: 3s
---------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---------------------|----------|----------|----------|----------|-------------------|
All files | 100 | 100 | 100 | 100 | |
cmd-shim | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
cmd-shim/lib | 100 | 100 | 100 | 100 | |
to-batch-syntax.js | 100 | 100 | 100 | 100 | |
---------------------|----------|----------|----------|----------|-------------------|Any ideas why? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
setcommand parameter value read from %~p* parameter extension needed to be quoted to avoid special characters (like&)from path breaking command.Current implementation:
evaluates to
passing all characters after & as shell command (and failing):
Quoting set command parameters seems to fix this issue completely.
References
Fixes #45
Closes #45