change environment properly
This commit is contained in:
parent
3ec1800883
commit
7bccb06f60
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@squeebot/cli",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.0-1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@squeebot/cli",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "Squeebot v3 runtime, environments and configuration",
|
||||
"main": "dist/squeebot.js",
|
||||
"bin": {
|
||||
@ -29,7 +29,7 @@
|
||||
"typescript": "^4.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@squeebot/core": "^3.0.0",
|
||||
"@squeebot/core": "^3.0.1",
|
||||
"fs-extra": "^9.0.1",
|
||||
"node-watch": "^0.7.0",
|
||||
"tar": "^6.0.5",
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import readline from 'readline';
|
||||
import yargs from 'yargs';
|
||||
@ -28,6 +27,9 @@ async function start(argv: any): Promise<void> {
|
||||
const enviroFile = path.resolve(process.cwd(), argv.environment);
|
||||
const env: IEnvironment = await loadEnvironment(argv.environment, root);
|
||||
|
||||
// Change working directory to the environment
|
||||
process.chdir(env.path as string);
|
||||
|
||||
const sb = new Squeebot(env);
|
||||
|
||||
await sb.initialize(argv.e !== true);
|
||||
|
Loading…
Reference in New Issue
Block a user