Skip to content

Commit

Permalink
[Fixed] We must check the config dir before lib tables
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Apr 2, 2024
1 parent 70ea4b6 commit 8e86d42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/eeschema_do
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,6 @@ def can_be_done_using_cli(command, cfg):


def setup_config_files(cfg):
# Ensure we have a config dir
check_kicad_config_dir(cfg)
# Back-up the current eeschema configuration
cfg.conf_eeschema_bkp = backup_config('Eeschema', cfg.conf_eeschema, EESCHEMA_CFG_PRESENT, cfg)
# Create a suitable configuration
Expand Down Expand Up @@ -980,6 +978,8 @@ if __name__ == '__main__':
#
# Force english + UTF-8
os.environ['LANG'] = get_en_locale(logger)
# Ensure we have a config dir
check_kicad_config_dir(cfg)
# Make sure the user has sym-lib-table
check_lib_table(cfg.user_sym_lib_table, cfg.sys_sym_lib_table)
#
Expand Down
3 changes: 2 additions & 1 deletion src/pcbnew_do
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,6 @@ def wait_pcbnew_start_by_msg(cfg):

def setup_config_files(cfg):
# Back-up the current pcbnew configuration
check_kicad_config_dir(cfg)
cfg.conf_pcbnew_bkp = backup_config('PCBnew', cfg.conf_pcbnew, PCBNEW_CFG_PRESENT, cfg)
if cfg.conf_colors:
cfg.conf_colors_bkp = backup_config('Colors', cfg.conf_colors, PCBNEW_CFG_PRESENT, cfg)
Expand Down Expand Up @@ -1742,6 +1741,8 @@ if __name__ == '__main__': # noqa: C901
load_filters(cfg, args.errors_filter[0])

memorize_project(cfg)
# Ensure we have a config dir
check_kicad_config_dir(cfg)
# Make sure the user has fp-lib-table
check_lib_table(cfg.user_fp_lib_table, cfg.sys_fp_lib_table)
# Create output dir, compute full name for output file and remove it
Expand Down

0 comments on commit 8e86d42

Please sign in to comment.