function open(e,r,a){var c;if("function"==typeof r){a=r;r=null}switch(process.platform){case"darwin":c=r?'open -a "'+escape(r)+'"':"open";break;case"win32":c=r?'start "" "'+escape(r)+'"':'start ""';break;default:c=r?escape(r):"xdg-open"}process.env.SUDO_USER&&(c="sudo -u "+process.env.SUDO_USER+" "+c);return exec(c+' "'+escape(e)+'"',a)}function escape(e){return e.replace(/"/g,'\\"')}var exec=require("child_process").exec,path=require("path");module.exports=open;