Skip to content

Commit

Permalink
ensuredir
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart committed Feb 6, 2024
1 parent c2c3b62 commit 939e7cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ui/atomic/create-atomic/src/fetch-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
IManifestResponse,
ISearchInterfaceConfigurationResponse,
} from '@coveo/platform-client';
import {createWriteStream, readFileSync} from 'node:fs';
import {createWriteStream, mkdir, mkdirSync, readFileSync} from 'node:fs';
import {homedir} from 'node:os';
import {resolve} from 'node:path';
import {dirname, resolve} from 'node:path';

/**
* @coveo/platform-client's IManifestResponse with simplified configuration
Expand Down Expand Up @@ -89,6 +89,7 @@ async function getAndLogNgsp(pageId: string) {
'packages/cli-e2e/artifacts',
`ngsp${pageId}.log`
);
mkdirSync(dirname(logfilepath), {recursive: true});
const log = createWriteStream(logfilepath, {flags: 'a'});
log.write('---- Start of NGSP request ----');
log.write(`ok: ${request.ok}`);
Expand Down

0 comments on commit 939e7cd

Please sign in to comment.