Skip to content

Commit 114f99e

Browse files
committed
feat: host context command
1 parent d13570d commit 114f99e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cli.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22

33
const path = require('path');
4-
const {spawnSync} = require('child_process');
4+
const {execSync, spawnSync} = require('child_process');
55
const program = require('commander');
66
const chalk = require('chalk');
77
const deepAssign = require('deep-assign');
@@ -171,6 +171,11 @@ cliAction.command.forEach(command => {
171171
return exitHandler(spawnSync('dopr ', refArgs, cliOptions).status);
172172
}
173173

174+
// Command is expected to run in host context!
175+
if (cliAction.service === '@host') {
176+
return execSync(command, cliOptions);
177+
}
178+
174179
// Parse command
175180
const cliCommand = command
176181
.replace('%action%', action || '')

0 commit comments

Comments
 (0)