mirror of
https://github.com/clearlinux/mixer-tools.git
synced 2026-09-06 13:41:46 +00:00
Default to --native = true
This commit temporarily sets the default value for --native to true, making running inside a container an opt-in behavior. This will make the testing and transition to containerized mixer easier. Eventually this switch will be flipped back to false, making containerized the default running mode. To run in container, append '--native=false' to your command. Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ const Version = "4.6.1"
|
||||
|
||||
// Native controls whether mixer runs the command on the native machine or in a
|
||||
// container.
|
||||
var Native = false
|
||||
var Native = true
|
||||
|
||||
// Offline controls whether mixer attempts to automatically cache upstream
|
||||
// bundles. In offline mode, all necessary bundles must exist in local-bundles.
|
||||
|
||||
+4
-1
@@ -204,7 +204,7 @@ func init() {
|
||||
// TODO: Remove this once we drop the old config format
|
||||
RootCmd.PersistentFlags().BoolVar(&config.UseNewConfig, "new-config", false, "EXPERIMENTAL: use the new TOML config format")
|
||||
|
||||
RootCmd.PersistentFlags().BoolVar(&builder.Native, "native", false, "Run mixer command on native host instead of in a container")
|
||||
RootCmd.PersistentFlags().BoolVar(&builder.Native, "native", true, "Run mixer command on native host instead of in a container")
|
||||
RootCmd.PersistentFlags().BoolVar(&builder.Offline, "offline", false, "Skip caching upstream-bundles; work entirely with local-bundles")
|
||||
|
||||
RootCmd.AddCommand(initCmd)
|
||||
@@ -247,6 +247,9 @@ func reconstructCommand(cmd *cobra.Command, args []string) []string {
|
||||
}
|
||||
// For each flag that was set, append its name and value
|
||||
cmd.Flags().Visit(func(flag *pflag.Flag) {
|
||||
if flag.Name == "native" {
|
||||
return
|
||||
}
|
||||
command = append(command, "--"+flag.Name+"="+flag.Value.String())
|
||||
})
|
||||
// Append args
|
||||
|
||||
Reference in New Issue
Block a user