santree 0.2.10 → 0.2.11
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/dist/lib/linear.js +6 -2
- package/package.json +1 -1
package/dist/lib/linear.js
CHANGED
|
@@ -116,13 +116,17 @@ export async function startOAuthFlow() {
|
|
|
116
116
|
code_challenge_method: "S256",
|
|
117
117
|
});
|
|
118
118
|
const authUrl = `${LINEAR_AUTHORIZE_URL}?${params.toString()}`;
|
|
119
|
-
//
|
|
119
|
+
// Try to open browser, fall back to printing URL
|
|
120
120
|
const openCmd = process.platform === "darwin"
|
|
121
121
|
? "open"
|
|
122
122
|
: process.platform === "win32"
|
|
123
123
|
? "start"
|
|
124
124
|
: "xdg-open";
|
|
125
|
-
exec(`${openCmd} "${authUrl}"
|
|
125
|
+
exec(`${openCmd} "${authUrl}"`, (err) => {
|
|
126
|
+
if (err) {
|
|
127
|
+
console.error(`\nCouldn't open browser automatically. Open this URL manually:\n${authUrl}\n`);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
126
130
|
});
|
|
127
131
|
// Timeout after 2 minutes
|
|
128
132
|
setTimeout(() => {
|