8000 Refined the definition of `build_cache.path` and the `--build-path` behaviour by cmaglie · Pull Request #2673 · arduino/arduino-cli · GitHub
[go: up one dir, main page]

Skip to content

Refined the definition of build_cache.path and the --build-path behaviour #2673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added --build-path as alias for --input-dir in upload and debug commands
  • Loading branch information
cmaglie committed Sep 18, 2024
commit 13bca61d69885b54885d37bf815c3e9a1e571eed
4 changes: 4 additions & 0 deletions internal/cli/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command {
Long: i18n.Tr("Debug Arduino sketches. (this command opens an interactive gdb session)"),
Example: " " + os.Args[0] + " debug -b arduino:samd:mkr1000 -P atmel_ice /home/user/Arduino/MySketch",
Args: cobra.MaximumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
arguments.CheckFlagsConflicts(cmd, "input-dir", "build-path")
},
Run: func(cmd *cobra.Command, args []string) {
runDebugCommand(cmd.Context(), srv, args, &portArgs, &fqbnArg, interpreter, importDir, &programmer, printInfo, &profileArg, debugProperties)
},
Expand All @@ -65,6 +68,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command {
programmer.AddToCommand(debugCommand, srv)
profileArg.AddToCommand(debugCommand, srv)
debugCommand.Flags().StringVar(&interpreter, "interpreter", "console", i18n.Tr("Debug interpreter e.g.: %s", "console, mi, mi1, mi2, mi3"))
debugCommand.Flags().StringVarP(&importDir, "build-path", "", "", i18n.Tr("Directory containing binaries for debug."))
debugCommand.Flags().StringVarP(&importDir, "input-dir", "", "", i18n.Tr("Directory containing binaries for debug."))
debugCommand.Flags().BoolVarP(&printInfo, "info", "I", false, i18n.Tr("Show metadata about the debug session instead of starting the debugger."))
debugCommand.Flags().StringArrayVar(&debugProperties, "debug-property", []string{},
Expand Down
3 changes: 2 additions & 1 deletion internal/cli/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command {
" " + os.Args[0] + " upload -p 192.168.10.1 -b arduino:avr:uno --upload-field password=abc",
Args: cobra.MaximumNArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
arguments.CheckFlagsConflicts(cmd, "input-file", "input-dir")
arguments.CheckFlagsConflicts(cmd, "input-file", "input-dir", "build-path")
},
Run: func(cmd *cobra.Command, args []string) {
runUploadCommand(cmd.Context(), srv, args, uploadFields)
Expand All @@ -70,6 +70,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command {
fqbnArg.AddToCommand(uploadCommand, srv)
portArgs.AddToCommand(uploadCommand, srv)
profileArg.AddToCommand(uploadCommand, srv)
uploadCommand.Flags().StringVarP(&importDir, "build-path", "", "", i18n.Tr("Directory containing binaries to upload."))
uploadCommand.Flags().StringVarP(&importDir, "input-dir", "", "", i18n.Tr("Directory containing binaries to upload."))
uploadCommand.Flags().StringVarP(&importFile, "input-file", "i", "", i18n.Tr("Binary file to upload."))
uploadCommand.Flags().StringArrayVar(&uploadProperties, "upload-property", []string{},
Expand Down
0