gcs fixes (#3782)
This commit is contained in:
parent
26e9026106
commit
958c4a21ce
|
|
@ -1,11 +1,12 @@
|
|||
import { relative, join, resolve, sep } from 'node:path';
|
||||
import fs from 'fs-extra/esm';
|
||||
import fs from 'node:fs';
|
||||
|
||||
import { SitespeedioPlugin } from '@sitespeed.io/plugin';
|
||||
import readdir from 'recursive-readdir';
|
||||
// Documentation of @google-cloud/storage: https://cloud.google.com/nodejs/docs/reference/storage/2.3.x/Bucket#upload
|
||||
import { Storage } from '@google-cloud/storage';
|
||||
import intel from 'intel';
|
||||
import { throwIfMissing } from '../../support/util';
|
||||
import { throwIfMissing } from '../../support/util.js';
|
||||
|
||||
const log = intel.getLogger('sitespeedio.plugin.gcs');
|
||||
|
||||
|
|
@ -123,7 +124,7 @@ export default class GcsPlugin extends SitespeedioPlugin {
|
|||
);
|
||||
}
|
||||
if (gcsOptions.removeLocalResult) {
|
||||
await fs.remove(baseDir);
|
||||
fs.rmSync(baseDir, { recursive: true });
|
||||
log.debug(`Removed local files and directory ${baseDir}`);
|
||||
} else {
|
||||
log.debug(
|
||||
|
|
|
|||
Loading…
Reference in New Issue