diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 728df18..41e2171 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,17 +31,5 @@ jobs: sudo mv circom /usr/local/bin/ circom --version - - name: ls - run: ls - - name: pwd - run: pwd - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true - - name: Print Folder Tree - uses: jaywcjlove/github-action-folder-tree@main - with: - exclude: "node_modules|dist|.git|.husky" - name: Run tests run: npm run test diff --git a/src/bin/codegen.rs b/src/bin/codegen.rs index fc4b8fa..d9ab4d2 100644 --- a/src/bin/codegen.rs +++ b/src/bin/codegen.rs @@ -1,6 +1,6 @@ use clap::Parser; use serde::{Deserialize, Serialize}; -use std::fs; +use std::fs::{self, create_dir_all}; use std::path::PathBuf; use std::str::FromStr; @@ -487,6 +487,10 @@ fn parse_json_request( let mut file_path = std::env::current_dir()?; file_path.push("circuits"); file_path.push("main"); + + // create dir if doesn't exist + create_dir_all(&file_path)?; + file_path.push(format!("{}.circom", output_filename)); fs::write(&file_path, circuit_buffer)?;