diff options
author | maheshgudi | 2017-10-17 12:43:03 +0530 |
---|---|---|
committer | mahesh | 2017-10-20 11:51:47 +0530 |
commit | da9cfe53f6c427d5cb918ae9dd03d98f7c21afa1 (patch) | |
tree | e53fd593929ca91361ae2dd8960ddc97338141b3 /yaksh | |
parent | 9e31fd95ac56165c4ed4923e92fd7b673295cf79 (diff) | |
download | online_test-da9cfe53f6c427d5cb918ae9dd03d98f7c21afa1.tar.gz online_test-da9cfe53f6c427d5cb918ae9dd03d98f7c21afa1.tar.bz2 online_test-da9cfe53f6c427d5cb918ae9dd03d98f7c21afa1.zip |
Add shebang to bash code evaluator
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/bash_code_evaluator.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yaksh/bash_code_evaluator.py b/yaksh/bash_code_evaluator.py index a4f1389..038d39c 100644 --- a/yaksh/bash_code_evaluator.py +++ b/yaksh/bash_code_evaluator.py @@ -77,7 +77,8 @@ class BashCodeEvaluator(BaseEvaluator): if self.test_case_args: self.tc_args_path = self.create_submit_code_file('main.args') self.write_to_submit_code_file(self.tc_args_path, self.test_case_args) - self.user_answer = self.user_answer.replace("\r", "") + shebang = "#!/bin/bash\n" + self.user_answer = shebang + self.user_answer.replace("\r", "") self.test_case = self.test_case.replace("\r", "") self.write_to_submit_code_file(self.submit_code_path, self.user_answer) self.write_to_submit_code_file(self.test_code_path, self.test_case) |