Skip to content

config init ignores the --save-as flag #570

Closed
@kittaakos

Description

@kittaakos

Bug Report

Current behavior

When I try to initialize the default config file, the --save-as flag is ignored and config file will be created under ~/Library/Arduino15/arduino-config.yaml location.

Steps to reproduce:

akos.kitta@Akoss-MacBook-Pro build % ./arduino-cli version                                                   
arduino-cli Version: 0.7.1 Commit: 7668c46
akos.kitta@Akoss-MacBook-Pro build % ./arduino-cli config init --help                                        
Initializes a new configuration file into the default location ($EXE_DIR/cli-config.yml).
Usage:
  arduino-cli config init [flags]
Examples:
  # Creates a default configuration file into the default location.
  ./arduino-cli config init
Flags:
  -h, --help             help for init
      --save-as string   Sets where to save the configuration file [default is ./arduino-cli.yaml].
Global Flags:
      --additional-urls strings   Additional URLs for the board manager.
      --config-file string        The custom config file (if not specified the default will be used).
      --format string             The output format, can be [text|json]. (default "text")
      --log-file string           Path to the file where logs will be written.
      --log-format string         The output format for the logs, can be [text|json].
      --log-level string          Messages with this level and above will be logged.
  -v, --verbose                   Print the logs on the standard output.
akos.kitta@Akoss-MacBook-Pro build % ./arduino-cli config init --save-as ~/Documents/foo.yaml                
Config file written: /Users/akos.kitta/Library/Arduino15/arduino-cli.yaml
akos.kitta@Akoss-MacBook-Pro build % ./arduino-cli config init --save-as /Users/akos.kitta/Documents/foo.yaml
Config file written: /Users/akos.kitta/Library/Arduino15/arduino-cli.yaml

Expected behavior

Executing ./arduino-cli config init --save-as /Users/akos.kitta/Documents/foo.yaml creates the file under /Users/akos.kitta/Documents/foo.yaml

Environment

  • CLI version (output of arduino-cli version):
    arduino-cli Version: 0.7.1 Commit: 7668c46
  • OS and platform:
    macOS 10.15.1

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions