@@ -63871,6 +63871,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
63871
63871
step((generator = generator.apply(thisArg, _arguments || [])).next());
63872
63872
});
63873
63873
};
63874
+ var __asyncValues = (this && this.__asyncValues) || function (o) {
63875
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
63876
+ var m = o[Symbol.asyncIterator], i;
63877
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
63878
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
63879
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
63880
+ };
63874
63881
var __importDefault = (this && this.__importDefault) || function (mod) {
63875
63882
return (mod && mod.__esModule) ? mod : { "default": mod };
63876
63883
};
@@ -63886,13 +63893,29 @@ class PoetryCache extends cache_distributor_1.default {
63886
63893
this.patterns = patterns;
63887
63894
}
63888
63895
getCacheGlobalDirectories() {
63896
+ var e_1, _a;
63889
63897
return __awaiter(this, void 0, void 0, function* () {
63890
- const poetryConfig = yield this.getPoetryConfiguration();
63891
- const cacheDir = poetryConfig['cache-dir'];
63892
- const virtualenvsPath = poetryConfig['virtualenvs.path'].replace('{cache-dir}', cacheDir);
63893
- const paths = [virtualenvsPath];
63894
- if (poetryConfig['virtualenvs.in-project'] === true) {
63895
- paths.push(path.join(process.cwd(), '.venv'));
63898
+ const paths = [];
63899
+ const globber = yield glob.create(this.patterns);
63900
+ try {
63901
+ for (var _b = __asyncValues(globber.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
63902
+ const file = _c.value;
63903
+ const basedir = path.dirname(file);
63904
+ const poetryConfig = yield this.getPoetryConfiguration(basedir);
63905
+ const cacheDir = poetryConfig['cache-dir'];
63906
+ const virtualenvsPath = poetryConfig['virtualenvs.path'].replace('{cache-dir}', cacheDir);
63907
+ paths.push(virtualenvsPath);
63908
+ if (poetryConfig['virtualenvs.in-project'] === true) {
63909
+ paths.push(path.join(basedir, '.venv'));
63910
+ }
63911
+ }
63912
+ }
63913
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
63914
+ finally {
63915
+ try {
63916
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
63917
+ }
63918
+ finally { if (e_1) throw e_1.error; }
63896
63919
}
63897
63920
return paths;
63898
63921
});
@@ -63908,12 +63931,9 @@ class PoetryCache extends cache_distributor_1.default {
63908
63931
};
63909
63932
});
63910
63933
}
63911
- getPoetryConfiguration() {
63934
+ getPoetryConfiguration(basedir ) {
63912
63935
return __awaiter(this, void 0, void 0, function* () {
63913
- const { stdout, stderr, exitCode } = yield exec.getExecOutput('poetry', [
63914
- 'config',
63915
- '--list'
63916
- ]);
63936
+ const { stdout, stderr, exitCode } = yield exec.getExecOutput('poetry', ['config', '--list'], { cwd: basedir });
63917
63937
if (exitCode && stderr) {
63918
63938
throw new Error('Could not get cache folder path for poetry package manager');
63919
63939
}
0 commit comments