fix(init): use current path if unspecified

This commit is contained in:
ObserverOfTime 2024-10-16 17:19:52 +03:00 committed by Amaan Qureshi
parent 8681960fbc
commit f9a4e8ecdc
2 changed files with 5 additions and 4 deletions

View file

@ -137,7 +137,7 @@ impl JsonConfigOpts {
name: self.name.clone(),
camelcase: Some(self.camelcase),
scope: self.scope,
path: PathBuf::from("."),
path: None,
external_files: PathsJSON::Empty,
file_types: None,
highlights: PathsJSON::Empty,
@ -234,7 +234,7 @@ pub fn migrate_package_json(repo_path: &Path) -> Result<bool> {
name: name.clone(),
camelcase: Some(name.to_upper_camel_case()),
scope: l.scope.unwrap_or_else(|| format!("source.{name}")),
path: l.path,
path: Some(l.path),
external_files: l.external_files,
file_types: l.file_types,
highlights: l.highlights,