File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -220,10 +220,16 @@ func parseVMEnvVar() (username string, vmHostname string) {
220
220
// rules to be relative to configDir.
221
221
func gitIgnorePaths (configDir string ) ([]string , error ) {
222
222
223
+ // We must always ignore .devbox folder. It can contain information that
224
+ // is platform-specific, and so we should not sync it to the cloud-shell.
225
+ // Platform-specific info includes nix profile links to the nix store,
226
+ // and in the future, versions of specific packages in the flakes.lock file.
227
+ result := []string {".devbox" }
228
+
223
229
fpath := filepath .Join (configDir , ".gitignore" )
224
230
if _ , err := os .Stat (fpath ); err != nil {
225
231
if os .IsNotExist (err ) {
226
- return nil , nil
232
+ return result , nil
227
233
} else {
228
234
return nil , errors .WithStack (err )
229
235
}
@@ -234,6 +240,6 @@ func gitIgnorePaths(configDir string) ([]string, error) {
234
240
return nil , errors .WithStack (err )
235
241
}
236
242
237
- result := strings .Split (string (contents ), "\n " )
243
+ result = append ( result , strings .Split (string (contents ), "\n " ) ... )
238
244
return result , nil
239
245
}
You can’t perform that action at this time.
0 commit comments