diff options
| author | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-22 00:47:19 +0000 |
|---|---|---|
| committer | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-22 00:47:19 +0000 |
| commit | 68aa302faedc6df51f6049b43a50d813d95ca4db (patch) | |
| tree | e873934e717b57ac76222ffa64d1e302df7958e3 /lib/puppet/parser/grammar.ra | |
| parent | 70d23799504a2207e0886a60a8403fa2f16377e2 (diff) | |
| download | puppet-68aa302faedc6df51f6049b43a50d813d95ca4db.tar.gz puppet-68aa302faedc6df51f6049b43a50d813d95ca4db.tar.xz puppet-68aa302faedc6df51f6049b43a50d813d95ca4db.zip | |
Fix failure of test_importglobbing in test/parser/parser.rb
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@925 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/grammar.ra')
| -rw-r--r-- | lib/puppet/parser/grammar.ra | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra index 6ed4fd4d5..13a3729c6 100644 --- a/lib/puppet/parser/grammar.ra +++ b/lib/puppet/parser/grammar.ra @@ -454,7 +454,17 @@ import: IMPORT quotedtext { :line => @lexer.line ) Dir.chdir(dir) { - Dir.glob(val[1]).each { |file| + # We can't interpolate at this point since we don't have any + # scopes set up. Warn the user if they use a variable reference + pat = val[1].value + if pat.index("$") + Puppet.warning( + "The import of #{pat} contains a variable reference;" + + " variables are not interpolated for imports " + + "in file #{@lexer.file} at line #{@lexer.line}" + ) + end + Dir.glob(pat).each { |file| parser = Puppet::Parser::Parser.new() parser.files = self.files Puppet.debug("importing '%s'" % file) |
