This commit is contained in:
2024-11-09 19:15:29 -05:00
parent 6d6e63ea0d
commit 23e234eac0
13 changed files with 460 additions and 9 deletions
+4
View File
@@ -36,6 +36,7 @@ export const jjEnsure = async (opts) => {
if (_.isEmpty(jjYamlObj?.environments || {})) {
opts.context.error(`Wrong ${answer.jjYamlPath} file`)
}
jjConfigs.jjWorkSpacePath = path.dirname(answer.jjYamlPath)
jjConfigs.jjYamlObj = jjYamlObj
@@ -43,6 +44,7 @@ export const jjEnsure = async (opts) => {
} else {
jjConfigs.jjYamlPath = await fs.readFile(jjConfigs.configSaveFilePath, "utf8")
jjConfigs.jjWorkSpacePath = path.dirname(jjConfigs.jjYamlPath)
const jjYamlRawContent = await fs.readFile(jjConfigs.jjYamlPath, "utf8")
const jjYamlObj: any = YAML.load(jjYamlRawContent)
if (_.isEmpty(jjYamlObj?.environments || {})) {
@@ -51,4 +53,6 @@ export const jjEnsure = async (opts) => {
jjConfigs.jjYamlObj = jjYamlObj
}
jjConfigs.processEnvs.JJ_WORKSPACE_DIR = jjConfigs.jjWorkSpacePath
}