Skip to content

Commit c789734

Browse files
committed
Fixed issue with spaces in filenames when launching pico8
1 parent 7153202 commit c789734

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to the "pico8vscodeeditor" extension will be documented in this file.
33

4+
## 0.2.3
5+
6+
Fixed issue with paths with spaces in when launching pico8
7+
48
## 0.2.2
59

610
Updated readme with video demo.

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ Documentation needs more info :)
150150

151151
## Release Notes
152152

153+
### 0.2.3
154+
155+
Fixed issue with paths with spaces in when launching pico8
156+
153157
### 0.2.2
154158

155159
Updated readme with video demo.

src/extension.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function activate(context: vscode.ExtensionContext) {
2929

3030
document.save().then(s => {
3131
// Would be good to set the root path to the folder the file is in, but doesn't seem to be a commandline option?
32-
process.exec(`${picoPath} -run ${filename} ${additionalParams}`, (err, stdout, stderr) => {
32+
process.exec(`${picoPath} -run "${filename}" ${additionalParams}`, (err, stdout, stderr) => {
3333
if (stdout && stdout.length > 0) {
3434
console.log(`pico8 output: ${stdout}`);
3535
}
@@ -71,7 +71,7 @@ export function activate(context: vscode.ExtensionContext) {
7171

7272
document.save().then(s => {
7373
// Would be good to set the root path to the folder the file is in, but doesn't seem to be a commandline option?
74-
process.exec(`${picoPath} ${filename} ${additionalParams}`, (err, stdout, stderr) => {
74+
process.exec(`${picoPath} "${filename}" ${additionalParams}`, (err, stdout, stderr) => {
7575
if (stdout && stdout.length > 0) {
7676
console.log(`pico8 output: ${stdout}`);
7777
}

0 commit comments

Comments
 (0)