@@ -332,25 +332,6 @@ func (d *Devbox) PrintEnv(ctx context.Context, includeHooks bool) (string, error
332
332
return envStr , nil
333
333
}
334
334
335
- // OnlyPathWithoutWrappers is a small utility to filter WrapperBin paths from PATH
336
- func OnlyPathWithoutWrappers () string {
337
-
338
- path := []string {}
339
- for _ , p := range strings .Split (os .Getenv ("PATH" ), string (filepath .ListSeparator )) {
340
- // Intentionally do not include projectDir with plugin.WrapperBinPath so that
341
- // we filter out bin-wrappers for devbox-global and devbox-project.
342
- if ! strings .Contains (p , plugin .WrapperBinPath ) {
343
- path = append (path , p )
344
- }
345
- }
346
-
347
- envs := map [string ]string {
348
- "PATH" : strings .Join (path , string (filepath .ListSeparator )),
349
- }
350
-
351
- return exportify (envs )
352
- }
353
-
354
335
func (d * Devbox ) ShellEnvHash (ctx context.Context ) (string , error ) {
355
336
envs , err := d .nixEnv (ctx )
356
337
if err != nil {
@@ -1231,3 +1212,22 @@ func (d *Devbox) convertEnvToMap(currentEnv []string) (map[string]string, error)
1231
1212
}
1232
1213
return env , nil
1233
1214
}
1215
+
1216
+ // ExportedSystemPathWithoutWrappers is a small utility to filter WrapperBin paths from PATH
1217
+ func ExportedSystemPathWithoutWrappers () string {
1218
+
1219
+ path := []string {}
1220
+ for _ , p := range strings .Split (os .Getenv ("PATH" ), string (filepath .ListSeparator )) {
1221
+ // Intentionally do not include projectDir with plugin.WrapperBinPath so that
1222
+ // we filter out bin-wrappers for devbox-global and devbox-project.
1223
+ if ! strings .Contains (p , plugin .WrapperBinPath ) {
1224
+ path = append (path , p )
1225
+ }
1226
+ }
1227
+
1228
+ envs := map [string ]string {
1229
+ "PATH" : strings .Join (path , string (filepath .ListSeparator )),
1230
+ }
1231
+
1232
+ return exportify (envs )
1233
+ }
0 commit comments