Permalink
Browse files

Set SHINY_SERVER_VERSION env var in R process

  • Loading branch information...
1 parent e76a223 commit f47e9be823988778e269451c64122a4555adc6b2 @jcheng5 jcheng5 committed Mar 22, 2013
Showing with 5 additions and 2 deletions.
  1. +2 −1 R/SockJSAdapter.R
  2. +1 −0 lib/main.js
  3. +2 −1 lib/worker/app-worker.js
View
@@ -22,7 +22,8 @@ local({
Sys.setenv(
SHINY_APP=input[1],
SHINY_PORT=input[2],
- SHINY_GAID=input[3])
+ SHINY_GAID=input[3],
+ SHINY_SERVER_VERSION=input[4])
close(fd)
View
@@ -32,6 +32,7 @@ var WorkerRegistry = require('./worker/worker-registry');
// Version strings
var packageInfo =
JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')));
+SHINY_SERVER_VERSION = packageInfo['version'];
var shinyVersionString = 'Shiny Server v' + packageInfo['version'];
var nodeVersionString = 'Node.js ' + process.version;
var versionString = shinyVersionString + ' (' + nodeVersionString + ')';
View
@@ -149,7 +149,8 @@ var AppWorker = function(appSpec, listenPort, logStream) {
this.$proc.stdin.end(
appSpec.appDir + '\n' +
listenPort + '\n' +
- (appSpec.settings.gaTrackingId || '') + '\n'
+ (appSpec.settings.gaTrackingId || '') + '\n' +
+ SHINY_SERVER_VERSION + '\n'
);
} catch (e) {
this.$dfEnded.reject(e);

0 comments on commit f47e9be

Please sign in to comment.