Skip to content

Commit 3954cf3

Browse files
committed
fix: add shebang
1 parent beb835c commit 3954cf3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"main": "./lib/lib.js",
1414
"types": "./lib/lib.d.ts",
15-
"bin": "./lib/index.js",
15+
"bin": "./lib/cloudflared.js",
1616
"scripts": {
1717
"test": "jest --coverage",
1818
"dev": "tsup --watch",

src/cloudflared.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env node
2+
import { main } from "./index.js";
3+
4+
main();

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import fs from "node:fs";
22
import { spawn } from "node:child_process";
33
import { bin, install } from "./lib.js";
44

5-
main();
6-
7-
async function main() {
5+
export async function main(): Promise<void> {
86
const args = process.argv.slice(2);
97

108
if (args[0] === "bin") {

0 commit comments

Comments
 (0)