Skip to content

Commit 97509eb

Browse files
committed
Ensure build/rust-code-blocks directory exists before use
1 parent 65a6733 commit 97509eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

exts/rust-code-runner/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
def setup(app):
66

77
app.output_rust_file = "build/rust-code-blocks/generated.rs"
8+
9+
# create build dir
10+
if not os.path.exists("build/rust-code-blocks"):
11+
os.makedirs("build/rust-code-blocks")
812
if os.path.isfile(app.output_rust_file):
913
with open(app.output_rust_file, 'w'):
1014
pass

0 commit comments

Comments
 (0)