-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: TypeError: s.trim is not a function on rpm and deb target
Close #1784
- Loading branch information
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,9 @@ export function normalizeOptions(args: CliOptions): BuildOptions { | |
(<any>result).config = config | ||
} | ||
(<any>config).extraMetadata = extraMetadata | ||
} | ||
|
||
if (config != null && typeof config !== "string" && config.extraMetadata != null) { | ||
coerceTypes(config.extraMetadata) | ||
} | ||
|
||
|
@@ -187,6 +189,9 @@ export function coerceTypes(host: any): any { | |
else if (value === "null") { | ||
host[key] = null | ||
} | ||
else if (key === "version" && typeof value === "number") { | ||
host[key] = value.toString() | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
develar
Author
Member
|
||
else if (value != null && typeof value === "object") { | ||
coerceTypes(value) | ||
} | ||
|
@develar I think this is too specific to what we were doing on Etcher, and doesn't actually fix our problem, so maybe these three lines should be reverted?
ping @jviotti
Or then again, perhaps they are actually useful in case somebody does happen to use numeric-versioning instead of semver-versioning? *shrug*