!1008 pipeserver with mac

Merge pull request !1008 from 卡哥/master
This commit is contained in:
openharmony_ci
2022-08-24 12:45:41 +00:00
committed by Gitee
+6 -1
View File
@@ -40,7 +40,7 @@ const pluginCommandChannelMessageHandlers = {
'compileComponent': handlePluginCompileComponent,
'default': () => {}
};
const es2abcFilePath = path.join(__dirname, '../bin/ark/build-win/bin/es2abc');
let es2abcFilePath = path.join(__dirname, '../bin/ark/build-win/bin/es2abc');
let previewCacheFilePath;
const messages = [];
@@ -137,6 +137,11 @@ function handlePluginCompileComponent(jsonData) {
receivedMsg.data.log = log;
if (fs.existsSync(es2abcFilePath + '.exe') || fs.existsSync(es2abcFilePath)){
es2abc(receivedMsg);
} else {
es2abcFilePath = path.join(__dirname, '../bin/ark/build-mac/bin/es2abc');
if (fs.existsSync(es2abcFilePath)) {
es2abc(receivedMsg);
}
}
}