Skip to content

Commit a722546

Browse files
committed
fix: set relative functionsDir
1 parent 813a2e2 commit a722546

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/utils/init/config-github.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { relative } from 'node:path'
2+
13
import type { NetlifyAPI } from '@netlify/api'
24
import { Octokit } from '@octokit/rest'
35

@@ -256,7 +258,8 @@ export const configGithub = async ({
256258
deploy_key_id: deployKey.id,
257259
base: baseDir,
258260
dir: buildDir,
259-
functions_dir: functionsDir,
261+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
262+
functions_dir: relative(config.build.base ?? command.workingDir, functionsDir),
260263
...(buildCmd && { cmd: buildCmd }),
261264
}
262265

src/utils/init/config-manual.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { relative } from 'node:path'
2+
13
import inquirer from 'inquirer'
24

35
import { exit, log } from '../command-helpers.js'
@@ -95,7 +97,8 @@ export default async function configManual({
9597
deploy_key_id: deployKey.id,
9698
base: baseDir,
9799
dir: buildDir,
98-
functions_dir: functionsDir,
100+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
101+
functions_dir: relative(config.build.base ?? command.workingDir, functionsDir),
99102
...(buildCmd && { cmd: buildCmd }),
100103
}
101104

0 commit comments

Comments
 (0)