Skip to content

Commit

Permalink
fixes format operation ignoring FsType
Browse files Browse the repository at this point in the history
Previously, format would always mirror the filesystem type of the already existing partiton.
  • Loading branch information
taukakao committed Nov 23, 2024
1 parent d8fef5c commit 8deb981
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,15 @@ func runSetupOperation(diskLabel, operation string, args []interface{}) error {
return operationError(operation, err)
}
filesystem := args[1].(string)
target.GetPartition(partNum).Filesystem = disk.PartitionFs(filesystem)
err = disk.MakeFs(target.GetPartition(partNum))
part := target.GetPartition(partNum)
part.Filesystem = disk.PartitionFs(filesystem)
err = disk.MakeFs(part)
if err != nil {
return operationError(operation, err)
}
if len(args) == 3 {
label := args[2].(string)
err := target.GetPartition(partNum).SetLabel(label)
err := part.SetLabel(label)
if err != nil {
return operationError(operation, err)
}
Expand Down

0 comments on commit 8deb981

Please sign in to comment.