firefly-compiler 0.4.57 → 0.4.59

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.
@@ -106,6 +106,7 @@ extend self: NodeSystem {
106
106
  environment: Option[Map[String, String]] = None
107
107
  maxBuffer: Int = 16777216
108
108
  killSignal: Int = 9
109
+ windowsShell: Bool = True
109
110
  ): ProcessResult
110
111
  target node async """
111
112
  import * as childProcess from 'node:child_process';
@@ -117,11 +118,11 @@ extend self: NodeSystem {
117
118
  ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String
118
119
  );
119
120
  }
120
- if(process.platform === 'win32') {
121
+ if(windowsShell_ && process.platform === 'win32') {
121
122
  arguments_ = ['/C', ...[command_, ...arguments_].map(argument =>
122
123
  argument.replaceAll(/([^A-Za-z0-9/_-])/g, "^$1")
123
124
  )];
124
- command_ = 'cmd.exe';
125
+ command_ = process.env.ComSpec || 'cmd.exe';
125
126
  }
126
127
  const newProcess = childProcess.spawn(command_, arguments_, {
127
128
  cwd: workingDirectory_.value_,
@@ -244,7 +244,7 @@ export function NodeSystem_environment(self_) {
244
244
  throw new Error('Function NodeSystem_environment is missing on this target in sync context.');
245
245
  }
246
246
 
247
- export function NodeSystem_execute(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), workingDirectory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9) {
247
+ export function NodeSystem_execute(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), workingDirectory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9, windowsShell_ = true) {
248
248
  throw new Error('Function NodeSystem_execute is missing on this target in sync context.');
249
249
  }
250
250
 
@@ -358,7 +358,7 @@ export async function NodeSystem_environment$(self_, $task) {
358
358
 
359
359
  }
360
360
 
361
- export async function NodeSystem_execute$(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), workingDirectory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9, $task) {
361
+ export async function NodeSystem_execute$(self_, command_, arguments_, standardIn_ = ff_core_Buffer.new_(0), workingDirectory_ = ff_core_Option.None(), environment_ = ff_core_Option.None(), maxBuffer_ = 16777216, killSignal_ = 9, windowsShell_ = true, $task) {
362
362
 
363
363
  const childProcess = import$3;
364
364
  const environment = environment_.value_ !== void 0 ? {} : process.env;
@@ -369,11 +369,11 @@ export async function NodeSystem_execute$(self_, command_, arguments_, standardI
369
369
  ff_core_Ordering.ff_core_Ordering_Order$ff_core_String_String
370
370
  );
371
371
  }
372
- if(process.platform === 'win32') {
372
+ if(windowsShell_ && process.platform === 'win32') {
373
373
  arguments_ = ['/C', ...[command_, ...arguments_].map(argument =>
374
374
  argument.replaceAll(/([^A-Za-z0-9/_-])/g, "^$1")
375
375
  )];
376
- command_ = 'cmd.exe';
376
+ command_ = process.env.ComSpec || 'cmd.exe';
377
377
  }
378
378
  const newProcess = childProcess.spawn(command_, arguments_, {
379
379
  cwd: workingDirectory_.value_,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.57",
7
+ "version": "0.4.59",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.57",
7
+ "version": "0.4.59",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"