Skip to content

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

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

Closed
kittaakos opened this issue Jan 30, 2020 · 0 comments · Fixed by #575
Closed

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

kittaakos opened this issue Jan 30, 2020 · 0 comments · Fixed by #575

Comments

@kittaakos
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants