Skip to content

Commit

Permalink
fixed a small issue with enternig repl mode and added an exit command
Browse files Browse the repository at this point in the history
  • Loading branch information
justinwilaby committed Jan 30, 2025
1 parent c3e72a4 commit eb8e5f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/cli/bin/heroku-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ module.exports.herokuRepl = async function (config) {

for await (const input of commandGenerator()) {
const [command, ...argv] = input
if (command === '.exit') {
process.exit(0)
}

if (command.startsWith('set')) {
flagsByName.set(argv[0], argv[1])
process.stderr.write(`setting --app to "${argv[1]}"\n$ `)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const main = async () => {
try {
await config.load()
const {_: [commandName, ...args], ...flags} = yargs
if (!args.length && !Object.keys(flags).length) {
if (!commandName && !args.length && !Object.keys(flags).length) {
return await herokuRepl(config)
}
if (flags.prompt) {
Expand Down

0 comments on commit eb8e5f6

Please sign in to comment.