From d0d31bf092786c60d27d0713e71135c1d023d8bd Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:03:25 -0500 Subject: [PATCH] bug: refresh venv if .rtx.toml is modified --- rtx.plugin.toml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/rtx.plugin.toml b/rtx.plugin.toml index 39d7190..e948f3c 100644 --- a/rtx.plugin.toml +++ b/rtx.plugin.toml @@ -2,30 +2,16 @@ [exec-env] cache-key = [ - """ - {% if project_root %} - {{ project_root | canonicalize }} - {% endif %} - """, - """ - {% if opts.virtualenv %} - {{ opts.virtualenv }} - {% endif %} - """ + "{% if project_root %}{{ project_root | canonicalize }}{% endif %}", + "{% if project_root %}{% set config_path = project_root ~ '/.rtx.toml' %}{% if config_path is file_exists %}{{ config_path | last_modified }}{% endif %}{% endif %}", + "{% if opts.virtualenv %}{{ opts.virtualenv }}{% endif %}", ] [list-bin-paths] cache-key = [ - """ - {% if project_root %} - {{ project_root | canonicalize }} - {% endif %} - """, - """ - {% if opts.virtualenv %} - {{ opts.virtualenv }} - {% endif %} - """ + "{% if project_root %}{{ project_root | canonicalize }}{% endif %}", + "{% if project_root %}{% set config_path = project_root ~ '/.rtx.toml' %}{% if config_path is file_exists %}{{ config_path | last_modified }}{% endif %}{% endif %}", + "{% if opts.virtualenv %}{{ opts.virtualenv }}{% endif %}", ] [list-legacy-filenames]