[PDK-914] template-url access check too strict Created: 2018/04/09  Updated: 2019/01/24  Resolved: 2018/12/10

Status: Resolved
Project: Puppet Development Kit
Component/s: None
Affects Version/s: None
Fix Version/s: PDK 1.9.0

Type: Bug Priority: Normal
Reporter: David Schmitt Assignee: Tim Sharpe
Resolution: Fixed Votes: 0
Labels: resolved-issue-added
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux; Debian testing; PDK nightly


Template:
Method Found: Needs Assessment
Release Notes: Bug Fix
Release Notes Summary: Fixes a bug in PDK that will falsely report that a valid local template directory set in the user's answer file as invalid if the local template directory is not a git repo.
QA Risk Assessment: Needs Assessment

 Description   

When using a local directory as template-url (e.g. for development purposes), the nightly PDK complains about this, and removes the configuration:

david@davids:~/git/puppet-resource_api/spec/fixtures/test_module$ pdk --version
pdk (WARN): Unable to access the previously used template '/home/david/git/pdk-templates/', using the default template instead.
1.5.0.pre (gc69497c)
david@davids:~/git/puppet-resource_api/spec/fixtures/test_module$ ls /home/david/git/pdk-templates/
config_defaults.yml  Gemfile  LICENSE  moduleroot  moduleroot_init  NOTICE  object_templates  README.md  rubocop
david@davids:~/git/puppet-resource_api/spec/fixtures/test_module$ 

This is likely due to a too strict check in https://github.com/puppetlabs/pdk/blob/d459244855ea402ee5639cf82d9ec8009a83efbc/lib/pdk/util.rb#L186


Generated at Mon Oct 14 06:14:30 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.