diff --git a/bench/app.py b/bench/app.py index 1b62a92b..e5dd5495 100755 --- a/bench/app.py +++ b/bench/app.py @@ -105,7 +105,7 @@ def install_app(app, bench_path='.', verbose=False): def remove_app(app, bench_path='.'): - if not app in get_apps(): + if not app in get_apps(bench_path): print "No app named {0}".format(app) sys.exit(1) @@ -121,10 +121,10 @@ def remove_app(app, bench_path='.'): print "Cannot remove, app is installed on site: {0}".format(site) sys.exit(1) - exec_cmd(["{0} uninstall -y {1}".format(pip, app_path)], cwd=bench_path) + exec_cmd(["{0} uninstall -y {1}".format(pip, app_path)]) remove_from_appstxt(app, bench_path) shutil.rmtree(app_path) - run_frappe_cmd("build", cwd=bench_path) + run_frappe_cmd("build", bench_path=bench_path) if get_config(bench_path).get('restart_supervisor_on_update'): restart_supervisor_processes(bench_path=bench_path) diff --git a/bench/tests/test_init.py b/bench/tests/test_init.py index bf9374e1..df13ebbd 100755 --- a/bench/tests/test_init.py +++ b/bench/tests/test_init.py @@ -118,10 +118,8 @@ class TestBenchInit(unittest.TestCase): def test_remove_app(self): - site_name = "test-site-4.dev" self.init_bench('test-bench') - self.new_site(site_name) bench_path = os.path.join(self.benches_path, "test-bench") # get app