Skip to content

Commit 0f13ffc

Browse files
committed
perf: 优化云开发处理逻辑
1 parent bba6e44 commit 0f13ffc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

res/scripts/document_start.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
(() => {
22
{
3-
if (!window.env) {
3+
if (location.href.includes('cloudconsole') && !window._cloudConsoleFixed) {
44
// fix: 云开发 -> 记录列表 -> 右键菜单项目缺少
55
let env = undefined
6+
window._cloudConsoleFixed = true
67
Object.defineProperty(window, 'env', {
78
set(v) {
89
v.platform = 'linux'

tools/rebuild-node-modules.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ PY_VERSION=`python -V 2>&1|awk '{print $2}'|awk -F '.' '{print $1}'`
2727
# TODO: 兼容python2.7的命令
2828
if [ $PY_VERSION != 2 ]; then
2929
hash python2.7 2>/dev/null || hash python2 2>/dev/null || { fail "I require python2 but it's not installed. Aborting."; exit 1; }
30+
mkdir -p "$root_dir/tmp/bin"
3031
if hash python2.7 2>/dev/null; then
31-
ln -s "$( which python2.7 )" "$root_dir/node/bin/python"
32+
ln -s "$( which python2.7 )" "$root_dir/tmp/bin/python"
3233
else
33-
ln -s "$( which python2 )" "$root_dir/node/bin/python"
34+
ln -s "$( which python2 )" "$root_dir/tmp/bin/python"
3435
fi
3536
fi
3637

0 commit comments

Comments
 (0)