Skip to content

Commit

Permalink
fix: add autostart support
Browse files Browse the repository at this point in the history
  • Loading branch information
npenin committed Nov 24, 2024
1 parent 6d76e2b commit 3313b6c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/pm/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ export default async function start(this: State, pm: pmContainer.container & Con
else
def = this.config.containers[instanceConfig.container];

if (typeof options.autostart !== 'undefined')
if (instanceConfig)
instanceConfig.autostart = options.autostart;
else
{
this.config.mapping.set(options.name || name, { container: name, autostart: options.autostart });
await this.config.commit()
}

// eslint-disable-next-line no-var
var container = this.processes[options.name || name];
if (container && container.running)
Expand Down

0 comments on commit 3313b6c

Please sign in to comment.