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.
@@ -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
- // Open browser
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(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "santree",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Git worktree manager",
5
5
  "license": "MIT",
6
6
  "author": "Santiago Toscanini",