task 支持运行 mjs 文件

This commit is contained in:
whyour
2023-08-05 11:02:29 +08:00
parent 624c9374e5
commit 0bf28e9ab3
4 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ single_hanle() {
## 选择python3还是node
define_program() {
local file_param=$1
if [[ $file_param == *.js ]]; then
if [[ $file_param == *.js ]] || [[ $file_param == *.mjs ]]; then
which_program="node"
elif [[ $file_param == *.py ]] || [[ $file_param == *.pyc ]]; then
which_program="python3"