Skip to content

Commit

Permalink
Adhere to sync_to_cloud option in temp snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchell Stanley committed Sep 2, 2019
1 parent 41bba94 commit 1c9c0b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/snipline_cli/services/temp_snippet_editor_file.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ sync_to_cloud = true
)
end

def sync_to_cloud?
config = SniplineCli.config
toml = TOML.parse(File.read(File.expand_path("#{config.get("general.temp_dir")}/temp.toml")))
toml["sync_to_cloud"].as(Bool)
end

def delete
config = SniplineCli.config
if File.exists?(File.expand_path("#{config.get("general.temp_dir")}/temp.toml"))
Expand Down

0 comments on commit 1c9c0b5

Please sign in to comment.