Skip to content

Commit

Permalink
fix invalid directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lonerapier committed Aug 29, 2024
1 parent 653421f commit fa0c107
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion src/bin/codegen.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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)?;
Expand Down

0 comments on commit fa0c107

Please sign in to comment.