Skip to content

Commit 4b6092b

Browse files
author
Thomas Osowski
committed
Fix ENV var
1 parent 441d23d commit 4b6092b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/ruby/app-issue-creator/server.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
require 'octokit'
66

77
begin
8-
GITHUB_APP_ID = contents["app_id"]
8+
GITHUB_APP_ID = ENV.fetch("GITHUB_APP_ID")
99
path_to_pem = './private-key.pem'
1010
GITHUB_PRIVATE_KEY = File.read(path_to_pem)
1111
rescue KeyError
1212
$stderr.puts "To run this script, please set the following environment variables:"
1313
$stderr.puts "- GITHUB_APP_ID: GitHub App ID"
14+
exit 1
1415
rescue Exception => e
15-
$stderr.puts "To run this script, please copy you App's private key to this directory"
16+
$stderr.puts "To run this script, please copy your App's private key to this directory"
1617
$stderr.puts " and rename it to `private_key.pem`"
18+
exit 1
1719
end
1820

1921
@client = nil

0 commit comments

Comments
 (0)