Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add command line option to disable shared folder #66

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions mech/mech.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ def up(self, arguments):

Options:
--gui Start GUI
--disable-shared-folder Do not share folder with VM
--provision Enable provisioning
--insecure Do not validate SSL certificates
--cacert FILE CA certificate for SSL download
Expand All @@ -596,6 +597,7 @@ def up(self, arguments):
-h, --help Print this help
"""
gui = arguments['--gui']
disable_shared_folder = not arguments['--disable-shared-folder']
save = not arguments['--no-cache']
requests_kwargs = utils.get_requests_kwargs(arguments)

Expand All @@ -616,8 +618,9 @@ def up(self, arguments):
lookup = self.get("enable_ip_lookup", False)
ip = vmrun.getGuestIPAddress(lookup=lookup)
puts_err(colored.blue("Sharing current folder..."))
vmrun.enableSharedFolders()
vmrun.addSharedFolder('mech', os.getcwd(), quiet=True)
if not disable_shared_folder:
vmrun.enableSharedFolders()
vmrun.addSharedFolder('mech', os.getcwd(), quiet=True)
if ip:
if started:
puts_err(colored.green("VM started on {}".format(ip)))
Expand Down