-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): when error opening a link - show it in console (#1385)
* fix(cli): when error opening a link - show it in console * fix: when coder env variable is set - print open url * fix: ensure shim for keytar works * fix: show url in cli * fix: print url * chore: Bump codemod cli * test(cli): add unit tests for CredentialsStorage functionality (#1401) * test(cli): add unit tests for CredentialsStorage functionality * test(cli): expand unit test coverage of credentialsStorage + keytar --------- Co-authored-by: Cameron Seebach <[email protected]>
- Loading branch information
1 parent
9c9f898
commit 006e9f8
Showing
11 changed files
with
301 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"codemod": patch | ||
--- | ||
|
||
Fixed fallback in case keytar cannot be used (fixes issue with authorization in headless environment) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { Printer } from "@codemod-com/printer"; | ||
import openOriginal from "open"; | ||
|
||
export async function open(url: string, printer: Printer) { | ||
try { | ||
console.log(`Opening the following URL in your browser: ${url}\n`); | ||
return await openOriginal(url); | ||
} catch (error: any) { | ||
printer.printOperationMessage({ | ||
kind: "error", | ||
message: `Please open the following URL in your browser: ${url}`, | ||
}); | ||
} | ||
} |
Oops, something went wrong.