@jacebenson/jsn 0.0.4 → 0.0.5
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/package.json +1 -1
- package/src/auth.js +5 -5
package/package.json
CHANGED
package/src/auth.js
CHANGED
|
@@ -178,11 +178,11 @@ export class AuthManager {
|
|
|
178
178
|
const open = (await import('node:child_process')).spawn;
|
|
179
179
|
const platform = process.platform;
|
|
180
180
|
const cmd = platform === 'darwin' ? 'open' : platform === 'win32' ? 'start' : 'xdg-open';
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
const child = open(cmd, [authURL], { detached: true, stdio: 'ignore' });
|
|
182
|
+
child.on('error', () => {
|
|
183
|
+
// xdg-open not installed — user will open the URL manually
|
|
184
|
+
});
|
|
185
|
+
child.unref();
|
|
186
186
|
|
|
187
187
|
console.log('After authenticating in the browser, copy the authorization code shown on the page.');
|
|
188
188
|
console.log('(input is hidden for security — just paste and press Enter)');
|