We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d37162c commit 606e2eaCopy full SHA for 606e2ea
src/service.ts
@@ -51,7 +51,7 @@ export class NotInstalledError extends Error {
51
* Install Cloudflared service.
52
* @param token Tunnel service token.
53
*/
54
-export function install(token: string): void {
+export function install(token?: string): void {
55
if (process.platform !== "darwin") {
56
throw new Error(`Not Implemented on platform ${process.platform}`);
57
}
@@ -60,7 +60,13 @@ export function install(token: string): void {
60
throw new AlreadyInstalledError();
61
62
63
- spawnSync(bin, ["service", "install", token]);
+ const args = ["service", "install"];
64
+
65
+ if (token) {
66
+ args.push(token);
67
+ }
68
69
+ spawnSync(bin, args);
70
71
72
/**
0 commit comments