Skip to content

Commit b67de1a

Browse files
committed
Fix output files in build() step
1 parent bca66d5 commit b67de1a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/builder.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mkdir -p "$(dirname "$IMPORT_BIN")"
1010
curl -sfLS "https://import.pw" > "$IMPORT_BIN"
1111
chmod +x "$IMPORT_BIN"
1212

13-
# Install `curl`
13+
# Install static `curl` binary
1414
IMPORT_CURL="$IMPORT_CACHE/bin/curl"
1515
curl -sfLS "https://github.com/dtschan/curl-static/releases/download/v7.63.0/curl" > "$IMPORT_CURL"
1616
chmod +x "$IMPORT_CURL"
@@ -19,6 +19,8 @@ chmod +x "$IMPORT_CURL"
1919
mkdir -p "$(dirname "$DIST/$ENTRYPOINT")"
2020
cp "$ENTRYPOINT" "$DIST/$ENTRYPOINT"
2121

22+
cd "$DIST"
23+
2224
# Copy in the runtime
2325
cp "$BUILDER/runtime.sh" "$IMPORT_CACHE"
2426
cp "$BUILDER/bootstrap" "$DIST"

src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ export async function build({
3232
workPath,
3333
files,
3434
entrypoint,
35-
meta,
35+
meta = {},
3636
config = {}
3737
}: BuildOptions) {
3838
const configEnv: Env = {};
39-
const distPath = join(workPath, '.now', 'dist', entrypoint);
39+
const { devCacheDir = join(workPath, '.now', 'cache') } = meta;
40+
const distPath = join(devCacheDir, 'bash', entrypoint);
41+
4042
await download(files, workPath, meta);
4143

4244
for (const [key, val] of Object.entries(config)) {
@@ -66,7 +68,7 @@ export async function build({
6668

6769
const builderPath = join(__dirname, 'builder.sh');
6870

69-
await execa(builderPath, [entrypoint], {
71+
await execa(builderPath, [], {
7072
env,
7173
cwd: workPath,
7274
stdio: 'inherit'

0 commit comments

Comments
 (0)