Skip to content

Commit

Permalink
Remove creds requirement when in local repo mode (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfinkel authored Sep 3, 2020
1 parent 673c31e commit 7db7bad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.1

- [FIXED] Credentials are no longer expected when running in local repo mode.

# 1.1.0

- [NEW] "local" `repo` positional argument option is now valid bypassing remote validation.
Expand Down
2 changes: 1 addition & 1 deletion harvest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
"""The Auditree file collating and reporting tool."""

__version__ = '1.1.0'
__version__ = '1.1.1'
7 changes: 4 additions & 3 deletions harvest/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ def _init_arguments(self):
def _validate_arguments(self, args):
if args.repo == 'local':
if not args.repo_path:
return 'ERROR: --repo-path expected for "local" mode'
return 'ERROR: --repo-path required when using local repo mode'
args.repo = 'https://local/local/local'
args.no_validate = False
args.creds = None
parsed = urlparse(args.repo)
if not (parsed.scheme and parsed.hostname and parsed.path):
return (
Expand Down Expand Up @@ -129,7 +130,7 @@ def _validate_arguments(self, args):
def _run(self, args):
collator = Collator(
args.repo,
Config(args.creds),
Config(args.creds) if args.creds else None,
'master',
args.repo_path,
args.no_validate
Expand Down Expand Up @@ -187,7 +188,7 @@ def _validate_arguments(self, args):
def _run(self, args):
reporter = self.report(
args.repo,
Config(args.creds),
Config(args.creds) if args.creds else None,
'master',
args.repo_path,
self.template_dir,
Expand Down

0 comments on commit 7db7bad

Please sign in to comment.