Skip to content

Commit

Permalink
Update quote function to fix path separator regression (#2974)
Browse files Browse the repository at this point in the history
  • Loading branch information
nasinlock authored and bobbrow committed Jan 26, 2023
1 parent 31a371d commit 7c2288d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Bug Fixes:
- Fix failed activation when using the `cmake.allowUnsupportedPresetsVersions` setting. [#2968](https://github.com/microsoft/vscode-cmake-tools/issues/2968)
- Verify binary directories only if there are multiple sources. [#2963](https://github.com/microsoft/vscode-cmake-tools/issues/2963)
- Update quote function to fix path separator regression [#2974](https://github.com/microsoft/vscode-cmake-tools/pull/2974)

## 1.13.41
Bug Fixes:
Expand Down
6 changes: 1 addition & 5 deletions src/shlex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ export function quote(str: string, opt?: ShlexOptions): string {
if (str === '') {
return '""';
}
if (!/[\s]/g.test(str)) {
// Don't quote if the string doesn't have whitespace
return str;
}
if (/[^\w@%\-+=:,./|]/.test(str)) {
if (/[^\w@%\-+=:,./|><]/.test(str)) {
str = str.replace(/"/g, '\\"');
return `"${str}"`;
} else {
Expand Down

0 comments on commit 7c2288d

Please sign in to comment.