bdy 1.22.52-dev → 1.22.53-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distTs/package.json +1 -1
- package/distTs/src/input.js +9 -3
- package/package.json +1 -1
package/distTs/package.json
CHANGED
package/distTs/src/input.js
CHANGED
|
@@ -864,14 +864,20 @@ class Input {
|
|
|
864
864
|
return p;
|
|
865
865
|
}
|
|
866
866
|
static restApiWorkspace(workspace, allowNull, ignoreProjectConfig = false) {
|
|
867
|
+
// Inside a sandbox, cfg/project cfg (set by an explicit `bdy login` or .bdy/cfg.json)
|
|
868
|
+
// takes precedence over the sandbox-injected BUDDY_WORKSPACE env var.
|
|
869
|
+
// Outside a sandbox, env beats cfg.
|
|
867
870
|
const ProjectCfg = require('./project/cfg').default;
|
|
868
|
-
let w =
|
|
869
|
-
|
|
870
|
-
|
|
871
|
+
let w = workspace;
|
|
872
|
+
const inSandbox = (0, utils_1.isInSandbox)();
|
|
873
|
+
if (!w && !inSandbox && process.env.BUDDY_WORKSPACE)
|
|
874
|
+
w = process.env.BUDDY_WORKSPACE;
|
|
871
875
|
if (!w && !ignoreProjectConfig)
|
|
872
876
|
w = ProjectCfg.getWorkspace();
|
|
873
877
|
if (!w)
|
|
874
878
|
w = cfg_1.default.getWorkspace();
|
|
879
|
+
if (!w && inSandbox && process.env.BUDDY_WORKSPACE)
|
|
880
|
+
w = process.env.BUDDY_WORKSPACE;
|
|
875
881
|
if (!w) {
|
|
876
882
|
if (allowNull)
|
|
877
883
|
return null;
|