From 1771151f6492da5c371640e85fbec040f830a5a0 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 22 Dec 2020 11:30:23 +0100 Subject: [PATCH] Error if $BUNDLE_GEMFILE is set but does not exist --- dist/index.js | 2 ++ index.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index 445d0de..ef17efe 100644 --- a/dist/index.js +++ b/dist/index.js @@ -51908,6 +51908,8 @@ function detectGemfiles() { const gemfilePath = process.env['BUNDLE_GEMFILE'] || 'Gemfile' if (fs.existsSync(gemfilePath)) { return [gemfilePath, `${gemfilePath}.lock`] + } else if (process.env['BUNDLE_GEMFILE']) { + throw new Error(`$BUNDLE_GEMFILE is set to ${gemfilePath} but does not exist`) } if (fs.existsSync("gems.rb")) { diff --git a/index.js b/index.js index 9a57fb4..7cfe526 100644 --- a/index.js +++ b/index.js @@ -80,6 +80,8 @@ function detectGemfiles() { const gemfilePath = process.env['BUNDLE_GEMFILE'] || 'Gemfile' if (fs.existsSync(gemfilePath)) { return [gemfilePath, `${gemfilePath}.lock`] + } else if (process.env['BUNDLE_GEMFILE']) { + throw new Error(`$BUNDLE_GEMFILE is set to ${gemfilePath} but does not exist`) } if (fs.existsSync("gems.rb")) {