Permalink
Browse files

Replace leftover lex.VAR_NAME_RE.match by match.IsValidVarName (#128)

  • Loading branch information...
Yorwba authored and andychu committed May 29, 2018
1 parent d12a555 commit dbc0bcc59422c0aa145b524d485732604ca12b65
Showing with 3 additions and 2 deletions.
  1. +3 −2 core/builtin.py
View
@@ -37,6 +37,7 @@
from osh.meta import runtime
from osh import lex
from osh import match
from _devbuild.gen import osh_help # generated file
@@ -664,7 +665,7 @@ def Export(argv, mem):
arg, i = EXPORT_SPEC.Parse(argv)
if arg.n:
for name in argv[i:]:
m = lex.VAR_NAME_RE.match(name)
m = match.IsValidVarName(name)
if not m:
raise args.UsageError('export: Invalid variable name %r' % name)
@@ -680,7 +681,7 @@ def Export(argv, mem):
name, s = parts
val = runtime.Str(s)
m = lex.VAR_NAME_RE.match(name)
m = match.IsValidVarName(name)
if not m:
raise args.UsageError('export: Invalid variable name %r' % name)

0 comments on commit dbc0bcc

Please sign in to comment.