@corva/create-app 0.60.0-1 → 0.60.0-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,7 +94,7 @@ const getEnvManagementLink = (manifest) => {
94
94
  }
95
95
 
96
96
  if (IS_WINDOWS) {
97
- return 'https://github.com/pyenv-win/pyenv-win';
97
+ return 'https://docs.python.org/3/using/windows.html#using-python-on-windows';
98
98
  }
99
99
 
100
100
  return 'https://github.com/pyenv/pyenv';
@@ -8,7 +8,13 @@ import { promises as fs } from 'fs';
8
8
  import os from 'os';
9
9
  import semver from 'semver';
10
10
 
11
- const checkCliVersion = async (command, version, stdErr = false) =>
11
+ /**
12
+ *
13
+ * @param {string} command
14
+ * @param {string} version
15
+ * @returns {Promise<boolean>}
16
+ */
17
+ const checkCliVersion = async (command, version) =>
12
18
  new Promise((resolve) => {
13
19
  const child = spawn(command, ['--version']);
14
20
 
@@ -103,10 +109,18 @@ export const resolveAppRuntime = (opts) => {
103
109
 
104
110
  return {
105
111
  language: 'python',
106
- isRuntimeAvailable: async () =>
107
- IS_WINDOWS
108
- ? (await checkCliVersion('python', version)) || (await checkCliVersion('python3', version))
109
- : checkCliVersion('python3', version),
112
+ isRuntimeAvailable: async () => {
113
+ if (!IS_WINDOWS) {
114
+ return checkCliVersion(`python${version}`, version);
115
+ }
116
+
117
+ return (
118
+ (await checkCliVersion(`py -${version}`, version)) ||
119
+ (await checkCliVersion('python', version)) ||
120
+ (await checkCliVersion('python3', version))
121
+ );
122
+ },
123
+
110
124
  packageManager: 'pip',
111
125
  version,
112
126
  semver: semverVersionsMapping.python[version],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.60.0-1",
3
+ "version": "0.60.0-3",
4
4
  "private": false,
5
5
  "description": "Create an app to use it in CORVA.AI",
6
6
  "keywords": [