def update_context(self):
if self.context.is_directory(self.local):<EOL><INDENT>self.context.options['<STR_LIT>'] = self.local<EOL><DEDENT>else:<EOL><INDENT>self.context.options.pop('<STR_LIT>', None)<EOL><DEDENT>
Try to ensure that external commands are executed in the local repository.

What :func:`update_context()` does depends on whether the directory
given by :attr:`local` exists:

- If :attr:`local` exists then the working directory of :attr:`context`
  will be set to :attr:`local`. This is to ensure that version control
  commands are run inside of the intended version control repository.

- If :attr:`local` doesn't exist then the working directory of
  :attr:`context` is cleared. This avoids external commands from
  failing due to an invalid (non existing) working directory.