You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(backend): Add check to cli tools to confirm the right commands for deployment method are used (#9687)
* refactor
* rename functions
* move checking for a package install out
* [FR] Add check to cli tools to confirm the right commands for deployment method are used
Fixes#9684
* also log pkg enviroment detection
* vendor is_true
* ensure content is loaded in pkg enviroment
* fix tests and imporve error message
* cleanup
* simplify
* ensure runs in misconfed enviroment
Copy file name to clipboardExpand all lines: docs/docs/settings/error_codes.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,13 @@ There are database migrations waiting to be applied. This might lead to integrit
99
99
Some deployment methods support [auto applying of updates](../start/config.md#auto-update). See also [Perform Database Migrations](../start/install.md#perform-database-migrations).
100
100
Steps very between deployment methods.
101
101
102
+
#### INVE-W9
103
+
**Wrong Invoke Environment - Backend**
104
+
105
+
The command that was used to run invoke is not the one that is recommended. This might be caused by a wrong PATH variable or by thinking you are using a different deployment method.
106
+
The warning text will show the recommended command for intended use.
107
+
108
+
102
109
### INVE-I (InvenTree Information)
103
110
Information — These are not errors but information messages. They might point out potential issues or just provide information.
warning('Unknown environment, not checking used invoke command')
226
+
227
+
iffirst_cmdnotinintendded:
228
+
correct_cmd=correct_cmdifcorrect_cmdelse'invoke'
229
+
error('INVE-W9 - Wrong Invoke Environment')
230
+
error(
231
+
f'The detected invoke command `{first_cmd}` is not the intended one for this environment, ensure you are using one of the following command(s) `{correct_cmd}`'
232
+
)
233
+
234
+
235
+
defmain():
236
+
"""Main function to check the execution environment."""
0 commit comments