alurkerja-cli 1.0.6 → 1.0.8
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.
- package/index.js +5 -2
- package/index.js.backup +5 -2
- package/package.json +1 -1
- package/package.json.backup +1 -1
package/index.js
CHANGED
|
@@ -17,7 +17,8 @@ const GITLAB_BASE = 'https://gitlab.javan.co.id/alurkerja/on-premises/toolkits/a
|
|
|
17
17
|
const GITLAB_TOKEN = 'javan-_P_JrtswtvrZekJDk1Lt'; // GitLab private token
|
|
18
18
|
const VERSION = 'v1.0.0'; // Will be replaced during build
|
|
19
19
|
const INSTALL_DIR = path.join(os.homedir(), '.alurkerja', 'bin');
|
|
20
|
-
const
|
|
20
|
+
const BINARY_NAME = os.platform() === 'win32' ? 'alurkerja.exe' : 'alurkerja';
|
|
21
|
+
const BINARY_PATH = path.join(INSTALL_DIR, BINARY_NAME);
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Detect current platform
|
|
@@ -200,9 +201,11 @@ function getInstalledVersion() {
|
|
|
200
201
|
* Execute the Go binary with provided arguments
|
|
201
202
|
*/
|
|
202
203
|
function executeBinary(args) {
|
|
204
|
+
// For Windows (including MinGW/Git Bash), use shell mode for better compatibility
|
|
205
|
+
const isWindows = os.platform() === 'win32';
|
|
203
206
|
const child = spawn(BINARY_PATH, args, {
|
|
204
207
|
stdio: 'inherit',
|
|
205
|
-
shell:
|
|
208
|
+
shell: isWindows
|
|
206
209
|
});
|
|
207
210
|
|
|
208
211
|
child.on('error', (err) => {
|
package/index.js.backup
CHANGED
|
@@ -17,7 +17,8 @@ const GITLAB_BASE = 'https://gitlab.javan.co.id/alurkerja/on-premises/toolkits/a
|
|
|
17
17
|
const GITLAB_TOKEN = 'javan-_P_JrtswtvrZekJDk1Lt'; // GitLab private token
|
|
18
18
|
const VERSION = 'v1.0.0'; // Will be replaced during build
|
|
19
19
|
const INSTALL_DIR = path.join(os.homedir(), '.alurkerja', 'bin');
|
|
20
|
-
const
|
|
20
|
+
const BINARY_NAME = os.platform() === 'win32' ? 'alurkerja.exe' : 'alurkerja';
|
|
21
|
+
const BINARY_PATH = path.join(INSTALL_DIR, BINARY_NAME);
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Detect current platform
|
|
@@ -200,9 +201,11 @@ function getInstalledVersion() {
|
|
|
200
201
|
* Execute the Go binary with provided arguments
|
|
201
202
|
*/
|
|
202
203
|
function executeBinary(args) {
|
|
204
|
+
// For Windows (including MinGW/Git Bash), use shell mode for better compatibility
|
|
205
|
+
const isWindows = os.platform() === 'win32';
|
|
203
206
|
const child = spawn(BINARY_PATH, args, {
|
|
204
207
|
stdio: 'inherit',
|
|
205
|
-
shell:
|
|
208
|
+
shell: isWindows
|
|
206
209
|
});
|
|
207
210
|
|
|
208
211
|
child.on('error', (err) => {
|
package/package.json
CHANGED