Skip to content

Commit

Permalink
Avoid uninstalling system image (NIL) (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperl authored Apr 21, 2022
1 parent 470f345 commit cb4c842
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/jaguar.toit
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ install_program program_size/int reader/reader.Reader -> none:
images := containers.images
jaguar := containers.current
images.do: | id/uuid.Uuid |
if id != jaguar: containers.uninstall id
// TODO(kasper): For now, we have to filter out the system
// process (NIL). It probably shouldn't be listed. Either way,
// the system image should react gracefully when someone tries
// to uninstall it.
if id != jaguar and id != uuid.NIL:
containers.uninstall id

logger.debug "installing program with $program_size bytes"
written_size := 0
Expand Down

0 comments on commit cb4c842

Please sign in to comment.