diff --git a/CHANGELOG.md b/CHANGELOG.md index f349b6a..49a0708 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # C/C++ Runner Change Log +## Version 9.4.9: Aug 23, 2024 + +- **Info**: Fixed rel. paths are replaced in local settings on start up +- **Info**: Partially fixed passing strings as cmd args to exe + ## Version 9.4.8: May 11, 2024 - **Info**: Fixed infinite loop of settings.json update diff --git a/package.json b/package.json index ef61034..40d3a47 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "c-cpp-runner", "displayName": "C/C++ Runner", "description": "🚀 Compile, run and debug single or multiple C/C++ files with ease. 🚀", - "version": "9.4.8", + "version": "9.4.9", "publisher": "franneck94", "license": "MIT", "icon": "icon.png", @@ -11,7 +11,7 @@ "theme": "dark" }, "engines": { - "vscode": "^1.85.0" + "vscode": "^1.90.0" }, "categories": [ "Programming Languages", diff --git a/src/executor/runner.ts b/src/executor/runner.ts index 53091fa..343543c 100644 --- a/src/executor/runner.ts +++ b/src/executor/runner.ts @@ -35,7 +35,7 @@ export async function executeRunTask( } if (argumentsString) { - commandLine += ` ${argumentsString.replace(/"/g, '')}`; + commandLine += ` ${argumentsString}`; } if (!commandLine) return; diff --git a/src/utils/fileUtils.ts b/src/utils/fileUtils.ts index 43003eb..3c8452e 100644 --- a/src/utils/fileUtils.ts +++ b/src/utils/fileUtils.ts @@ -37,6 +37,14 @@ export function pathExists(filepath: string) { return true; } +export function pathIsAbsolute(filepath: string) { + return path.isAbsolute(filepath); +} + +export function pathIsRelative(filepath: string) { + return !pathIsAbsolute(filepath); +} + export function isSourceFile(fileExt: string) { const fileExtLower = fileExt.toLowerCase(); @@ -211,7 +219,7 @@ export function localSettingExist(key: string, jsonData: JsonSettings) { if (!commandPath) return false; - if (!pathExists(commandPath)) return false; + if (pathIsAbsolute(commandPath) && !pathExists(commandPath)) return false; return true; }