@@ -348,25 +348,6 @@ func (d *Devbox) PrintEnvVars(ctx context.Context) ([]string, error) {
348
348
return keyEqualsValue (envs ), nil
349
349
}
350
350
351
- // OnlyPathWithoutWrappers is a small utility to filter WrapperBin paths from PATH
352
- func OnlyPathWithoutWrappers () string {
353
-
354
- path := []string {}
355
- for _ , p := range strings .Split (os .Getenv ("PATH" ), string (filepath .ListSeparator )) {
356
- // Intentionally do not include projectDir with plugin.WrapperBinPath so that
357
- // we filter out bin-wrappers for devbox-global and devbox-project.
358
- if ! strings .Contains (p , plugin .WrapperBinPath ) {
359
- path = append (path , p )
360
- }
361
- }
362
-
363
- envs := map [string ]string {
364
- "PATH" : strings .Join (path , string (filepath .ListSeparator )),
365
- }
366
-
367
- return exportify (envs )
368
- }
369
-
370
351
func (d * Devbox ) ShellEnvHash (ctx context.Context ) (string , error ) {
371
352
envs , err := d .nixEnv (ctx )
372
353
if err != nil {
@@ -1247,3 +1228,22 @@ func (d *Devbox) convertEnvToMap(currentEnv []string) (map[string]string, error)
1247
1228
}
1248
1229
return env , nil
1249
1230
}
1231
+
1232
+ // ExportifySystemPathWithoutWrappers is a small utility to filter WrapperBin paths from PATH
1233
+ func ExportifySystemPathWithoutWrappers () string {
1234
+
1235
+ path := []string {}
1236
+ for _ , p := range strings .Split (os .Getenv ("PATH" ), string (filepath .ListSeparator )) {
1237
+ // Intentionally do not include projectDir with plugin.WrapperBinPath so that
1238
+ // we filter out bin-wrappers for devbox-global and devbox-project.
1239
+ if ! strings .Contains (p , plugin .WrapperBinPath ) {
1240
+ path = append (path , p )
1241
+ }
1242
+ }
1243
+
1244
+ envs := map [string ]string {
1245
+ "PATH" : strings .Join (path , string (filepath .ListSeparator )),
1246
+ }
1247
+
1248
+ return exportify (envs )
1249
+ }
0 commit comments