Skip to content

Commit

Permalink
reset
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Apr 15, 2024
1 parent 9774b0e commit fe81e4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion socket.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
; copy_map = src/mapping.ini

; An list of environment variables, separated by commas.
env = HOME, USER, TMPDIR, PWD, DEBUG, UNION_RESET
env = HOME, USER, TMPDIR, PWD, DEBUG, RESET

; Advanced Compiler Settings (ie C++ compiler -02, -03, etc).
flags = -O3
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@ class AppView extends Tonic {
}

async initData () {
if (process.env.UNION_RESET === '1') {
if (process.env.RESET === '1') {
await rm(path.DATA)
const databases = await window.indexedDB.databases()
for (const { name } of databases) await Indexed.drop(name)
process.exit(0)
}

this.db = {
Expand Down

0 comments on commit fe81e4d

Please sign in to comment.