File tree Expand file tree Collapse file tree 7 files changed +20
-0
lines changed Expand file tree Collapse file tree 7 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 20
20
Args : cobra .MaximumNArgs (1 ),
21
21
Example : `podman machine init myvm` ,
22
22
ValidArgsFunction : completion .AutocompleteNone ,
23
+ PreRunE : noAarch64 ,
23
24
}
24
25
)
25
26
Original file line number Diff line number Diff line change 30
30
ValidArgsFunction : completion .AutocompleteNone ,
31
31
Example : `podman machine list,
32
32
podman machine ls` ,
33
+ PreRunE : noAarch64 ,
33
34
}
34
35
listFlag = listFlagType {}
35
36
)
Original file line number Diff line number Diff line change 3
3
package machine
4
4
5
5
import (
6
+ "errors"
7
+ "runtime"
6
8
"strings"
7
9
8
10
"github.com/containers/podman/v3/cmd/podman/registry"
16
18
noOp = func (cmd * cobra.Command , args []string ) error {
17
19
return nil
18
20
}
21
+ // noAarch64 temporarily disables arm64 support on
22
+ // Apple Silicon
23
+ noAarch64 = func (cmd * cobra.Command , args []string ) error {
24
+ if runtime .GOARCH == "arm64" {
25
+ if runtime .GOOS == "darwin" {
26
+ return errors .New ("due to missing upstream patches, Apple Silicon is not capable of running Podman machine yet" )
27
+ }
28
+ return errors .New ("no aarch64 images are available at this time" )
29
+ }
30
+ return nil
31
+ }
32
+
19
33
// Command: podman _machine_
20
34
machineCmd = & cobra.Command {
21
35
Use : "machine" ,
Original file line number Diff line number Diff line change 23
23
Args : cobra .MaximumNArgs (1 ),
24
24
Example : `podman machine rm myvm` ,
25
25
ValidArgsFunction : autocompleteMachine ,
26
+ PreRunE : noAarch64 ,
26
27
}
27
28
)
28
29
Original file line number Diff line number Diff line change 19
19
Example : `podman machine ssh myvm
20
20
podman machine ssh myvm echo hello` ,
21
21
ValidArgsFunction : autocompleteMachineSSH ,
22
+ PreRunE : noAarch64 ,
22
23
}
23
24
)
24
25
Original file line number Diff line number Diff line change 19
19
Args : cobra .MaximumNArgs (1 ),
20
20
Example : `podman machine start myvm` ,
21
21
ValidArgsFunction : autocompleteMachine ,
22
+ PreRunE : noAarch64 ,
22
23
}
23
24
)
24
25
Original file line number Diff line number Diff line change 18
18
Args : cobra .MaximumNArgs (1 ),
19
19
Example : `podman machine stop myvm` ,
20
20
ValidArgsFunction : autocompleteMachine ,
21
+ PreRunE : noAarch64 ,
21
22
}
22
23
)
23
24
You can’t perform that action at this time.
0 commit comments