From c890075c3678108c79dfb7ce11e1fc0cb2436990 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Sun, 9 Jan 2022 23:09:54 -0800 Subject: [PATCH] fix(cli): re-add shebang to electron-forge binary --- .eslintrc.json | 10 +++++++++- packages/api/cli/src/electron-forge.ts | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 71a173c149..856a0032f2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -45,7 +45,15 @@ { "files": ["packages/api/cli/src/**/*.ts", "tools/*.{js,ts}"], "rules": { - "no-process-exit": "off" + "no-process-exit": "off", + "node/shebang": [ + "error", + { + "convertPath": { + "src/*.ts": ["src/(.+?)\\.ts$", "dist/$1.js"] + } + } + ] } }, { diff --git a/packages/api/cli/src/electron-forge.ts b/packages/api/cli/src/electron-forge.ts index e860ec5287..6474d0c09a 100755 --- a/packages/api/cli/src/electron-forge.ts +++ b/packages/api/cli/src/electron-forge.ts @@ -1,3 +1,6 @@ +#!/usr/bin/env node +// This file requires a shebang above. If it is missing, this is an error. + import { asyncOra } from '@electron-forge/async-ora'; import chalk from 'chalk'; import program from 'commander';