Closed swissspidy closed 5 years ago
@swissspidy I can't fully understand why you do not want git reset
and git pull
to run. It is time or performance or keeping changes?
For example when you know the source code is already up to date or when working locally without internet connection. Running the commands would be unnecessary in that case.
I am not sure I see the need as the tool with mostly be used in production and not locally. 🤷♂️
For debugging it's helpful IMO :-)
For the times where you know the cached repository is up-to-date so you don't want to unnecessarily run
git reset
andgit pull
, just good oldwp i18n make-pot
on it.This could be done by adding a
--cached
flag toUpdateCommand
and passing that as an argument to\Required\Traduttore\Runner::run()
. In that case that method would simply call\Required\Traduttore\Loader::get_local_path()
instead of\Required\Traduttore\Loader::download()
.And if
\Required\Traduttore\Loader::get_local_path()
returnsnull
you know a cached repository doesn't exist and can throw an error in the terminal accordingly.