File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # This file is part of node-cli
4
+ #
5
+ # Copyright (C) 2022 SKALE Labs
6
+ #
7
+ # This program is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Affero General Public License as published by
9
+ # the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Affero General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Affero General Public License
18
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+
20
+ import os
21
+ from node_cli .configs import NODE_DATA_PATH
22
+
23
+ NODE_OPTIONS_FILEPATH = os .path .join (NODE_DATA_PATH , 'node_options.json' )
Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ def write_json(path, content):
81
81
json .dump (content , outfile , indent = 4 )
82
82
83
83
84
+ def init_file (path , content = None ):
85
+ if not os .path .exists (path ):
86
+ write_json (path , content )
87
+
88
+
84
89
def run_cmd (
85
90
cmd ,
86
91
env = {},
You can’t perform that action at this time.
0 commit comments