Skip to content

Commit

Permalink
project: use new Manifest.encoding constant (utf-8) to read manifest
Browse files Browse the repository at this point in the history
Fixes issue reported in PR #710 where most places are hardcoded to
'utf-8' while this one is (Windows) locale-dependent. In the future, we
may want to make this more flexible but the most urgent fix is
consistency: with this commit, manifest decoding should be hardcoded to
'utf-8' everywhere.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Jun 14, 2024
1 parent 645e7a3 commit 6726319
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/west/app/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def bootstrap(self, args) -> Path:
# Parse the manifest to get "self: path:", if it declares one.
# Otherwise, use the URL. Ignore imports -- all we really
# want to know is if there's a "self: path:" or not.
manifest = Manifest.from_data(temp_manifest.read_text(),
manifest = Manifest.from_data(temp_manifest.read_text(encoding=Manifest.encoding),
import_flags=ImportFlag.IGNORE)
if manifest.yaml_path:
manifest_path = manifest.yaml_path
Expand Down

0 comments on commit 6726319

Please sign in to comment.