Skip to content

Commit 6afcf23

Browse files
Fix build command to handle hardlink issue on Linux (#25)
Add rm -f before mv/cp operations in build commands to prevent 'cannot move file to itself' errors on Linux where the output WASM file is already a hardlink.
1 parent b4b317c commit 6afcf23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

data-collection/edgee-component.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ language = "Rust"
1313
wit-version = "1.0.0"
1414

1515
[component.build]
16-
command = "cargo build --target wasm32-wasip2 --release --target-dir ./target && mv ./target/wasm32-wasip2/release/example_rust_component.wasm ./component.wasm"
16+
command = "cargo build --target wasm32-wasip2 --release --target-dir ./target && rm -f ./component.wasm && mv ./target/wasm32-wasip2/release/example_rust_component.wasm ./component.wasm"
1717
output_path = "component.wasm"
1818

1919
[component.settings.example]

edge-function/edgee-component.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ language = "Rust"
1313
wit-version = "1.0.0"
1414

1515
[component.build]
16-
command = "cargo build --target wasm32-wasip2 --release --target-dir ./target && mv ./target/wasm32-wasip2/release/example_rust_edge_function_component.wasm ./component.wasm"
16+
command = "cargo build --target wasm32-wasip2 --release --target-dir ./target && rm -f ./component.wasm && mv ./target/wasm32-wasip2/release/example_rust_edge_function_component.wasm ./component.wasm"
1717
output_path = "component.wasm"
1818

1919
[component.settings.example]

0 commit comments

Comments
 (0)