Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
ci(fix): pre create api_key file as cross test got permission denied …
Browse files Browse the repository at this point in the history
…when create it
  • Loading branch information
thoongnv committed Nov 17, 2023
1 parent 1a77e45 commit 7c834d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ jobs:
echo "target dir is: ${{ env.TARGET_DIR }}"
- name: Build
run: |
${{ env.CARGO }} build --verbose ${{ env.TARGET_FLAGS }}
${{ env.CARGO }} clean
run: ${{ env.CARGO }} build --verbose ${{ env.TARGET_FLAGS }}

- name: Run tests
if: matrix.build != 'macos-arm'
shell: bash
run: ${{ env.CARGO }} test ${{ env.TARGET_FLAGS }} -- --nocapture
run: |
if [[ "${{ matrix.build }}" = "linux" || "${{ matrix.build }}" = "linux-arm" ]]; then
cargo test ${{ env.TARGET_FLAGS }} -- --nocapture
else
${{ env.CARGO }} test ${{ env.TARGET_FLAGS }} -- --nocapture
fi
4 changes: 1 addition & 3 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub fn get_config_dir() -> String {
let mut home_dir_str = String::new();

if let Some(home_dir) = dirs::home_dir() {
let mut dir_str = home_dir.display().to_string();
let dir_str = home_dir.display().to_string();

if Path::new(&format!("{}/.shodan", dir_str)).is_dir() {
home_dir_str = format!("{}/.shodan", dir_str);
Expand All @@ -17,8 +17,6 @@ pub fn get_config_dir() -> String {
}
}

println!("{}", home_dir_str);

home_dir_str
}

Expand Down

0 comments on commit 7c834d5

Please sign in to comment.