Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
fa6b82c5
Commit
fa6b82c5
authored
8 years ago
by
Mick Jordan
Browse files
Options
Downloads
Patches
Plain Diff
remove quotes on default values in Renviron files
parent
ff85f0be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/REnvVars.java
+12
-2
12 additions, 2 deletions
....r.runtime/src/com/oracle/truffle/r/runtime/REnvVars.java
with
12 additions
and
2 deletions
com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/REnvVars.java
+
12
−
2
View file @
fa6b82c5
...
...
@@ -220,7 +220,6 @@ public final class REnvVars implements RContext.ContextState {
}
String
var
=
line
.
substring
(
0
,
ix
);
String
value
=
expandParameters
(
line
.
substring
(
ix
+
1
)).
trim
();
// GnuR does not seem to remove quotes, although the spec says it should
envVars
.
put
(
var
,
value
);
}
}
...
...
@@ -243,7 +242,7 @@ public final class REnvVars implements RContext.ContextState {
}
String
paramValue
=
envVars
.
get
(
paramName
);
if
(
paramValue
==
null
||
paramValue
.
length
()
==
0
)
{
paramValue
=
paramDefault
;
paramValue
=
stripQuotes
(
paramDefault
)
;
}
result
.
append
(
paramValue
);
x
=
paramEnd
+
1
;
...
...
@@ -253,6 +252,17 @@ public final class REnvVars implements RContext.ContextState {
return
result
.
toString
();
}
private
static
String
stripQuotes
(
String
s
)
{
if
(
s
.
length
()
==
0
)
{
return
s
;
}
if
(
s
.
charAt
(
0
)
==
'\''
)
{
return
s
.
substring
(
1
,
s
.
length
()
-
1
);
}
else
{
return
s
;
}
}
@TruffleBoundary
private
static
IOException
invalid
(
String
path
,
String
line
)
throws
IOException
{
throw
new
IOException
(
" File "
+
path
+
" contains invalid line(s)\n "
+
line
+
"\n They were ignored\n"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment