This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from ethereum/fixremixd
Fixremixd
- Loading branch information
Showing
6 changed files
with
5,235 additions
and
1,951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const fs = require('fs') | ||
const os = require('os') | ||
const path = require('path') | ||
|
||
const cacheDir = path.join(os.homedir(), '.cache_remix_ide') | ||
const write = (data) => { | ||
const cache = read() | ||
try { | ||
fs.writeFileSync(cacheDir + '/config.json', JSON.stringify({...cache, ...data})) | ||
} catch (e) { | ||
console.error('Can\'t write config file', e) | ||
} | ||
} | ||
|
||
const read = () => { | ||
if(fs.existsSync(cacheDir + '/config.json')){ | ||
try { | ||
const data = JSON.parse(fs.readFileSync(cacheDir + '/config.json')) | ||
return data | ||
}catch(e){ | ||
console.error('Can\'t read config file', e) | ||
} | ||
} | ||
return undefined | ||
} | ||
|
||
exports.write = write | ||
exports.read = read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
22925bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello) How to use this fix on M1 ?
22925bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kindly explain how to use this