Sha256: 3de27d843e0b5f2a0bcbc84476b05e9a987b592c3d48175c40fe05de76c61984
Contents?: true
Size: 444 Bytes
Versions: 7
Compression:
Stored size: 444 Bytes
Contents
var fs = require('fs'); var common = require('./common'); //@ //@ ### cd('dir') //@ Changes to directory `dir` for the duration of the script function _cd(options, dir) { if (!dir) common.error('directory not specified'); if (!fs.existsSync(dir)) common.error('no such file or directory: ' + dir); if (!fs.statSync(dir).isDirectory()) common.error('not a directory: ' + dir); process.chdir(dir); } module.exports = _cd;
Version data entries
7 entries across 7 versions & 4 rubygems