File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ export namespace Config {
233233 theme : z . string ( ) . optional ( ) . describe ( "Theme name to use for the interface" ) ,
234234 keybinds : Keybinds . optional ( ) . describe ( "Custom keybind configurations" ) ,
235235 plugin : z . string ( ) . array ( ) . optional ( ) ,
236+ snapshot : z . boolean ( ) . optional ( ) ,
236237 share : z
237238 . enum ( [ "manual" , "auto" , "disabled" ] )
238239 . optional ( )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import fs from "fs/promises"
55import { Log } from "../util/log"
66import { Global } from "../global"
77import { z } from "zod"
8+ import { Config } from "../config/config"
89
910export namespace Snapshot {
1011 const log = Log . create ( { service : "snapshot" } )
@@ -26,6 +27,8 @@ export namespace Snapshot {
2627 export async function track ( ) {
2728 const app = App . info ( )
2829 if ( ! app . git ) return
30+ const cfg = await Config . get ( )
31+ if ( cfg . snapshot === false ) return
2932 const git = gitdir ( )
3033 if ( await fs . mkdir ( git , { recursive : true } ) ) {
3134 await $ `git init`
You can’t perform that action at this time.
0 commit comments