Skip to content

Commit

Permalink
chore: create redirect-errors file if not existent.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Sep 7, 2023
1 parent 5e060ec commit 4b1607c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmd/build/build_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func NewBuildConfigsCmd() *cobra.Command {
flags.Bool("skip-existing", true, "whether to skip the build of drivers existing on S3")
flags.Bool("publish", false, "whether artifacts must be published on S3")
flags.Bool("ignore-errors", false, "whether to ignore build errors and go on looping on config files")
flags.String("redirect-errors", "", "redirect error logs to a file")
flags.String("aws-profile", "", "aws-profile to be used. Mandatory if publish is enabled.")
flags.String("redirect-errors", "", "redirect build errors to the specified file")
flags.String("aws-profile", "", "aws-profile to be used. Mandatory if publish is enabled")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cleanup/cleanup_drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func NewCleanupDriversCmd() *cobra.Command {
}

flags := cmd.Flags()
flags.String("aws-profile", "", "aws-profile to be used. Mandatory.")
flags.String("aws-profile", "", "aws-profile to be used. Mandatory")

_ = cmd.MarkFlagRequired("aws-profile")
return cmd
Expand Down
6 changes: 3 additions & 3 deletions cmd/generate/generate_configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ func NewGenerateConfigsCmd() *cobra.Command {
Short: "Generate new dbg configs",
Long: `
In auto mode, configs will be generated starting from kernel-crawler output.
In this scenario, target-{distro,kernelrelease,kernelversion} are available to filter to-be-generated configs. Regexes are allowed.
In this scenario, --target-{distro,kernelrelease,kernelversion} are available to filter to-be-generated configs. Regexes are allowed.
Moreover, you can pass special value "load" as target-distro to make the tool automatically fetch latest distro kernel-crawler ran against.
Instead, when auto mode is disabled, the tool is able to generate a single config (for each driver version).
In this scenario, target-{distro,kernelrelease,kernelversion} CANNOT be regexes but must be exact values.
Also, in non-automatic mode, kernelurls driverkit config key will be constructed using driverkit libraries.
In this scenario, --target-{distro,kernelrelease,kernelversion} CANNOT be regexes but must be exact values.
Also, in non-automatic mode, kernelurls will be retrieved using driverkit libraries.
`,
RunE: executeConfigs,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/publish/publish_drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NewPublishDriversCmd() *cobra.Command {
RunE: executeDrivers,
}
flags := cmd.Flags()
flags.String("aws-profile", "", "aws-profile to be used. Mandatory.")
flags.String("aws-profile", "", "aws-profile to be used. Mandatory")

_ = cmd.MarkFlagRequired("aws-profile")
return cmd
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Run(opts Options) error {

var redirectErrorsF *os.File
if opts.RedirectErrors != "" {
redirectErrorsF, err = os.Open(opts.RedirectErrors)
redirectErrorsF, err = os.OpenFile(opts.RedirectErrors, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return err
}
Expand Down

0 comments on commit 4b1607c

Please sign in to comment.