mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Add some modification for calling "source" and external files
This commit is contained in:
parent
e468a790c7
commit
451c2e3bb7
1 changed files with 7 additions and 3 deletions
|
@ -457,8 +457,8 @@ def install_shellcheck():
|
|||
except Exception:
|
||||
print ("Package installation failed " + str(arg),file=sys.stderr)
|
||||
|
||||
def check_shellcheck(script_path):
|
||||
subprocess.run(["shellcheck",script_path])
|
||||
def check_shellcheck(script_name):
|
||||
subprocess.run(["shellcheck","-x",script_name])
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
|
@ -497,7 +497,11 @@ def main():
|
|||
check_helper_consistency(script)
|
||||
check_deprecated_practices(script)
|
||||
# check_arg_retrieval(script)
|
||||
check_shellcheck(script["path"])
|
||||
#change directory to accept relative path (example : source _common.sh
|
||||
current_dir=os.getcwd()
|
||||
os.chdir(app_path + "/scripts/")
|
||||
check_shellcheck(script_name)
|
||||
os.chdir(current_dir)
|
||||
|
||||
sys.exit(return_code)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue