libdragon 12.0.1 → 12.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,12 +34,13 @@ const initContainer = async (libdragonInfo) => {
34
34
  'run',
35
35
  '-d', // Detached
36
36
  '--mount',
37
- 'type=bind,source=' +
37
+ '"type=bind,source=' +
38
38
  libdragonInfo.root +
39
39
  ',target=' +
40
- CONTAINER_TARGET_PATH, // Mount files
41
- '-w=' + CONTAINER_TARGET_PATH, // Set working directory
42
- libdragonInfo.imageName,
40
+ CONTAINER_TARGET_PATH +
41
+ '"', // Mount files
42
+ '"-w=' + CONTAINER_TARGET_PATH + '"', // Set working directory
43
+ '"' + libdragonInfo.imageName + '"',
43
44
  'tail',
44
45
  '-f',
45
46
  '/dev/null',
@@ -60,10 +61,6 @@ const initContainer = async (libdragonInfo) => {
60
61
  '/n64_toolchain',
61
62
  ],
62
63
  {
63
- userCommand: false,
64
- inheritStdin: true,
65
- inheritStdout: false,
66
- inheritStderr: false,
67
64
  spawnOptions: {
68
65
  shell: true,
69
66
  },
@@ -188,6 +188,12 @@ function spawnProcess(
188
188
  // Prevent the annoying docker "What's next?" message. It messes up everything.
189
189
  DOCKER_CLI_HINTS: 'false',
190
190
  },
191
+ // On macos, we need to run the command in a shell for some docker commands
192
+ // to work properly. The ones with paths in them probably not working on
193
+ // macOS. No need to do this on Windows, as it'd now require additional
194
+ // escaping for the paths.
195
+ // shell: process.platform === 'darwin',
196
+ shell: true,
191
197
  ...spawnOptions,
192
198
  });
193
199
 
@@ -314,6 +320,7 @@ const dockerExec = /** @type {DockerExec} */ (
314
320
  ...options,
315
321
  spawnOptions: {
316
322
  cwd: workDir,
323
+ shell: false,
317
324
  ...options?.spawnOptions,
318
325
  },
319
326
  });
@@ -91,7 +91,7 @@ async function findContainerId(libdragonInfo) {
91
91
  '--format',
92
92
  '{{.}}{{.ID}}',
93
93
  '-f',
94
- 'volume=' + CONTAINER_TARGET_PATH,
94
+ '"volume=' + CONTAINER_TARGET_PATH + '"',
95
95
  ])
96
96
  )
97
97
  .split('\n')
package/modules/utils.js CHANGED
@@ -42,10 +42,6 @@ const installDependencies = async (libdragonInfo) => {
42
42
  ],
43
43
  ['/bin/bash', './build.sh'],
44
44
  {
45
- userCommand: false,
46
- inheritStdin: true,
47
- inheritStdout: false,
48
- inheritStderr: false,
49
45
  spawnOptions: {
50
46
  shell: true,
51
47
  },
@@ -142,7 +138,7 @@ async function runGit(libdragonInfo, params, options = {}) {
142
138
 
143
139
  return await spawnProcess(
144
140
  'git',
145
- ['-C', libdragonInfo.root, ...params],
141
+ ['-C', '"' + libdragonInfo.root + '"', ...params],
146
142
  // Windows git is breaking the TTY somehow - disable TTY for now
147
143
  // We are not able to display progress for the initial clone b/c of this
148
144
  // Enable progress otherwise.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libdragon",
3
- "version": "12.0.1",
3
+ "version": "12.0.3",
4
4
  "description": "This is a docker wrapper for libdragon",
5
5
  "main": "index.js",
6
6
  "engines": {