filer/src/shell/environment.js

16 lines
324 B
JavaScript
Raw Permalink Normal View History

var defaults = require('../constants.js').ENVIRONMENT;
2014-02-19 22:29:11 +00:00
module.exports = function Environment(env) {
env = env || {};
env.TMP = env.TMP || defaults.TMP;
env.PATH = env.PATH || defaults.PATH;
2014-02-19 22:29:11 +00:00
this.get = function(name) {
return env[name];
};
2014-02-19 22:29:11 +00:00
this.set = function(name, value) {
env[name] = value;
};
};