diff --git a/packages/download-binaries/package.json b/packages/download-binaries/package.json index 5702c9b32a..1d3180e841 100644 --- a/packages/download-binaries/package.json +++ b/packages/download-binaries/package.json @@ -6,9 +6,9 @@ "license": "MIT", "scripts": { "clean": "rm -rf dist/", - "build": "swc ./src/index.ts -o ./dist/index.mjs", - "download": "node ./dist/index.mjs" + "build": "swc ./src/index.ts -o ./dist/index.mjs" }, + "bin": "./dist/index.mjs", "files": [ "dist" ], diff --git a/packages/download-binaries/src/index.ts b/packages/download-binaries/src/index.ts index 7c0bf95832..3e885457d7 100644 --- a/packages/download-binaries/src/index.ts +++ b/packages/download-binaries/src/index.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node /** * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. @@ -17,8 +18,6 @@ import fetch from "node-fetch" import z from "zod"; import arg from "arg"; -console.log(process.argv) - const options = arg({ "--package": String, "--base-dir": String, diff --git a/packages/open-lens/package.json b/packages/open-lens/package.json index b7d04e2d67..e90eee759e 100644 --- a/packages/open-lens/package.json +++ b/packages/open-lens/package.json @@ -35,7 +35,7 @@ "dev:renderer": "env NODE_ENV=development ts-node ./webpack/dev-server.ts", "test:integration": "jest -xyz --runInBand --detectOpenHandles --forceExit --modulePaths=[\"/integration/\"];", "build:tray-icons": "ts-node build/generate-tray-icons.ts", - "download:binaries": "cd node_modules/@k8slens/download-binaries && npm run download -- --package $INIT_CWD/package.json --base-dir $INIT_CWD/binaries/client" + "download:binaries": "npm exec -- @k8slens/download-binaries --package $INIT_CWD/package.json --base-dir $INIT_CWD/binaries/client" }, "config": { "k8sProxyVersion": "0.3.0",