aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordeadprogram <[email protected]>2024-03-26 10:43:46 +0100
committerdeadprogram <[email protected]>2024-03-26 10:43:46 +0100
commit305e54c0e4627566f1d998f57d00a43b922e39bb (patch)
tree25f398d5f7d1e14a73d14036e828eb034bc1144f
parent7c51594927d9605f16e44656aca0fd368191d548 (diff)
downloadtinygo-305e54c0e4627566f1d998f57d00a43b922e39bb.tar.gz
tinygo-305e54c0e4627566f1d998f57d00a43b922e39bb.zip
builder: add check for error on creating needed directory as suggested by @b0ch3nskiwasm-nolibc
Signed-off-by: deadprogram <[email protected]>
-rw-r--r--builder/wasmbuiltins.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/builder/wasmbuiltins.go b/builder/wasmbuiltins.go
index 06366bf95..bcd92f3ec 100644
--- a/builder/wasmbuiltins.go
+++ b/builder/wasmbuiltins.go
@@ -10,7 +10,9 @@ import (
var WasmBuiltins = Library{
name: "wasmbuiltins",
makeHeaders: func(target, includeDir string) error {
- os.Mkdir(includeDir+"/bits", 0o777)
+ if err := os.Mkdir(includeDir+"/bits", 0o777); err != nil {
+ return err
+ }
f, err := os.Create(includeDir + "/bits/alltypes.h")
if err != nil {
return err