Skip to content

Commit 90107c0

Browse files
Fix getting the version of nativescript-cloud
In case `nativescript-cloud` lib is not installed, the spawned tns command fails and prints the result to the stdout. So add parsing of the result and use it only when the stdout is valid version.
1 parent 7fbd177 commit 90107c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sys-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export class SysInfo implements NativeScriptDoctor.ISysInfo {
301301
public getNativeScriptCloudVersion(): Promise<string> {
302302
return this.getValueForProperty(() => this.nativeScriptCloudVersionCache, async (): Promise<string> => {
303303
const output = await this.execCommand("tns cloud lib version");
304-
return output ? output.trim() : output;
304+
return output ? this.getVersionFromString(output.trim()) : output;
305305
});
306306
}
307307

0 commit comments

Comments
 (0)