Skip to content

Conversation

@gregorias
Copy link

Previously the workflow only works if config_path is a single directory. If we use something different, e.g., config_path: "dot_config/zmk/config", West fails with

Run west init -l "/__w/dotfiles/dotfiles/dot_config/corne-zmk/config"
  west init -l "/__w/dotfiles/dotfiles/dot_config/corne-zmk/config"
  shell: sh -e {0}
  env:
    build_dir: /tmp/tmp.a9rTeptW6V
    base_dir: /__w/dotfiles/dotfiles
    zephyr_version: 4.1.0
    extra_west_args:
    extra_cmake_args: -DSHIELD="corne_right nice_view_adapter nice_view"
    display_name: corne_right nice_view_adapter nice_view - nice_nano_v2
    artifact_name: corne_right nice_view_adapter nice_view-nice_nano_v2-zmk
=== Initializing from existing manifest repository config
--- Creating /__w/dotfiles/dotfiles/dot_config/corne-zmk/.west and local configuration file
=== Initialized. Now run "west update" inside /__w/dotfiles/dotfiles/dot_config/corne-zmk.

Run west update --fetch-opt=--filter=tree:0
FATAL ERROR: no west workspace found from "/__w/dotfiles/dotfiles"; "west update" requires one.
Things to try:
  - Change directory to somewhere inside a west workspace and retry.
  - Set ZEPHYR_BASE to a zephyr repository path in a west workspace.
  - Run "west init" to set up a workspace here.
  - Run "west init -h" for additional information.

This commit fixes the issue by introducing west_working_directory that points to the dirname of config_path.

PR check-list

  • Branch has a clean commit history
  • Additional tests are included, if changing behaviors/core code that is testable.
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • Pre-commit used to check formatting of files, commit messages, etc.
  • Includes any necessary documentation changes.

Previously the workflow only works if `config_path` is a single
directory. If we use something different, e.g., `config_path:
"dot_config/zmk/config"`, West fails with

```
Run west init -l "/__w/dotfiles/dotfiles/dot_config/corne-zmk/config"
  west init -l "/__w/dotfiles/dotfiles/dot_config/corne-zmk/config"
  shell: sh -e {0}
  env:
    build_dir: /tmp/tmp.a9rTeptW6V
    base_dir: /__w/dotfiles/dotfiles
    zephyr_version: 4.1.0
    extra_west_args:
    extra_cmake_args: -DSHIELD="corne_right nice_view_adapter nice_view"
    display_name: corne_right nice_view_adapter nice_view - nice_nano_v2
    artifact_name: corne_right nice_view_adapter nice_view-nice_nano_v2-zmk
=== Initializing from existing manifest repository config
--- Creating /__w/dotfiles/dotfiles/dot_config/corne-zmk/.west and local configuration file
=== Initialized. Now run "west update" inside /__w/dotfiles/dotfiles/dot_config/corne-zmk.

Run west update --fetch-opt=--filter=tree:0
FATAL ERROR: no west workspace found from "/__w/dotfiles/dotfiles"; "west update" requires one.
Things to try:
  - Change directory to somewhere inside a west workspace and retry.
  - Set ZEPHYR_BASE to a zephyr repository path in a west workspace.
  - Run "west init" to set up a workspace here.
  - Run "west init -h" for additional information.
```

This commit fixes the issue by introducing `west_working_directory` that
points to the dirname of `config_path`.
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 this pull request may close these issues.

1 participant