Skip to content

Commit fe884de

Browse files
committed
fix: Run prettier
1 parent a2a0d4e commit fe884de

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

test.js

+35-35
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const crossSpawn = require('cross-spawn');
22
const glob = require('glob-all');
3-
const JSZip = require('jszip');
3+
// const JSZip = require('jszip');
44
// const sha256File = require('sha256-file');
55
const tape = require('tape-promise/tape');
66

77
const {
88
// chmodSync,
99
removeSync,
10-
readFile,
11-
copySync,
10+
// readFile,
11+
// copySync,
1212
// writeFileSync,
1313
// statSync,
1414
// pathExistsSync,
@@ -128,38 +128,38 @@ const test = (desc, func, opts = {}) =>
128128
}
129129
});
130130

131-
const availablePythons = (() => {
132-
const binaries = [];
133-
const mapping = {};
134-
if (process.env.USE_PYTHON) {
135-
binaries.push(
136-
...process.env.USE_PYTHON.split(',').map((v) => v.toString().trim())
137-
);
138-
} else {
139-
// For running outside of CI
140-
binaries.push('python');
141-
}
142-
const exe = process.platform === 'win32' ? '.exe' : '';
143-
for (const bin of binaries) {
144-
const python = `${bin}${exe}`;
145-
const { stdout, status } = crossSpawn.sync(python, [
146-
'-c',
147-
'import sys; sys.stdout.write(".".join(map(str, sys.version_info[:2])))',
148-
]);
149-
const ver = stdout && stdout.toString().trim();
150-
if (!status && ver) {
151-
for (const recommend of [ver, ver.split('.')[0]]) {
152-
if (!mapping[recommend]) {
153-
mapping[recommend] = python;
154-
}
155-
}
156-
}
157-
}
158-
if (!Object.entries(mapping).length) {
159-
throw new Error('No pythons found');
160-
}
161-
return mapping;
162-
})();
131+
// const availablePythons = (() => {
132+
// const binaries = [];
133+
// const mapping = {};
134+
// if (process.env.USE_PYTHON) {
135+
// binaries.push(
136+
// ...process.env.USE_PYTHON.split(',').map((v) => v.toString().trim())
137+
// );
138+
// } else {
139+
// // For running outside of CI
140+
// binaries.push('python3');
141+
// }
142+
// const exe = process.platform === 'win32' ? '.exe' : '';
143+
// for (const bin of binaries) {
144+
// const python = `${bin}${exe}`;
145+
// const { stdout, status } = crossSpawn.sync(python, [
146+
// '-c',
147+
// 'import sys; sys.stdout.write(".".join(map(str, sys.version_info[:2])))',
148+
// ]);
149+
// const ver = stdout && stdout.toString().trim();
150+
// if (!status && ver) {
151+
// for (const recommend of [ver, ver.split('.')[0]]) {
152+
// if (!mapping[recommend]) {
153+
// mapping[recommend] = python;
154+
// }
155+
// }
156+
// }
157+
// }
158+
// if (!Object.entries(mapping).length) {
159+
// throw new Error('No pythons found');
160+
// }
161+
// return mapping;
162+
// })();
163163

164164
// const getPythonBin = (version) => {
165165
// const bin = availablePythons[String(version)];

0 commit comments

Comments
 (0)