Add support for running routines via command line
This commit is contained in:
@@ -25,6 +25,7 @@ class StatesService extends Service {
|
||||
'git.clone': require('../classes/state/git/CloneState'),
|
||||
'git.checkout': require('../classes/state/git/CheckoutState'),
|
||||
'git.tag': require('../classes/state/git/TagState'),
|
||||
'git.pull': require('../classes/state/git/PullState'),
|
||||
|
||||
'os.cmd': require('../classes/state/os/CommandState'),
|
||||
'os.alive': require('../classes/state/os/IsAliveState'),
|
||||
@@ -57,7 +58,7 @@ class StatesService extends Service {
|
||||
|
||||
const StepClass = this.constructor.#state_map[type]
|
||||
if ( !StepClass ) throw new Error(`Invalid or unknown step type: ${type}`)
|
||||
this.app.make(StepClass)
|
||||
this.app.di().inject(StepClass)
|
||||
|
||||
return new StepClass(host, state_config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user