crytic / medusa

Parallelized, coverage-guided, mutational Solidity smart contract fuzzing, powered by go-ethereum
https://www.trailofbits.com/
GNU Affero General Public License v3.0
273 stars 33 forks source link

feat: prompt user for overwrite if file already exists #381

Open to4to opened 1 week ago

to4to commented 1 week ago

Fixed Override Behavior with option to force overwrite

if _, err = os.Stat(outputPath); err == nil {
    // File already exists, prompt user for overwrite
    fmt.Print("The file already exists. Overwrite? (y/n): ")
    var response string
    fmt.Scan(&response)
    if response != "y" && response != "Y" {
        fmt.Println("Operation canceled.")
        return nil
    }
}

375

CLAassistant commented 1 week ago

CLA assistant check
All committers have signed the CLA.

0xalpharush commented 5 days ago

@to4to Would you mind running go fmt?

to4to commented 1 day ago

@to4to Would you mind running go fmt?

Done 👍