triggertaskonsave icon indicating copy to clipboard operation
triggertaskonsave copied to clipboard

Is it possible to know which files has been modified?

Open llgcode opened this issue 4 years ago • 7 comments

Hi Nigel, I need to reference the file(s) that has changed into the command of the task ${modified_file_path}.

Is it possible?

llgcode avatar Jun 14 '21 09:06 llgcode

It could set and environment variable which you could then reference with ${ENV:modified_file_path} (I believe). I'll see if I can add it.

Gruntfuggly avatar Jun 14 '21 10:06 Gruntfuggly

it looks fine if it's possible. So if it's an env variable it could be used like this %MODIFIED_FILE_PATH% on windows or $MODIFIED_FILE_PATH on linux

llgcode avatar Jun 14 '21 10:06 llgcode

I don't know to be honest. I'll see what works when I add it.

Gruntfuggly avatar Jun 14 '21 10:06 Gruntfuggly

it's fine

llgcode avatar Jun 14 '21 12:06 llgcode

i've been using ${file} in my tasks, which i only just found out doesn't refer to the modified file, but the currently selected file. spent ages trying to figure out why my python files were being messed up only to find that it was running on the wrong file when i quickly switch tabs after making a change

DetachHead avatar Nov 09 '21 01:11 DetachHead