@datatruck/cli 0.34.2 → 0.34.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.
|
@@ -69,8 +69,6 @@ class RestoreAction {
|
|
|
69
69
|
let { snapshot, pkg, task } = data;
|
|
70
70
|
const repoConfig = (0, config_1.findRepositoryOrFail)(this.config, snapshot.repositoryName);
|
|
71
71
|
const repo = await (0, repository_1.createAndInitRepo)(repoConfig, this.options.verbose);
|
|
72
|
-
if (this.options.initial)
|
|
73
|
-
pkg = { ...pkg, restorePath: pkg.path };
|
|
74
72
|
let snapshotPath = pkg.restorePath ?? pkg.path;
|
|
75
73
|
await data.gc.cleanupIfFail(async () => {
|
|
76
74
|
if (task) {
|
|
@@ -185,11 +183,13 @@ class RestoreAction {
|
|
|
185
183
|
},
|
|
186
184
|
exitOnError: false,
|
|
187
185
|
run: async (listTask) => {
|
|
188
|
-
|
|
186
|
+
let pkg = (0, config_1.resolvePackage)((0, config_1.findPackageOrFail)(this.config, snapshot.packageName), {
|
|
189
187
|
snapshotId: options.snapshotId,
|
|
190
188
|
snapshotDate: snapshot.date,
|
|
191
189
|
action: "restore",
|
|
192
190
|
});
|
|
191
|
+
if (this.options.initial)
|
|
192
|
+
pkg = { ...pkg, restorePath: pkg.path };
|
|
193
193
|
const gc = new temp_1.GargabeCollector();
|
|
194
194
|
const task = pkg.task ? (0, task_1.createTask)(pkg.task) : undefined;
|
|
195
195
|
const restore = await this.restore({
|