Skip to content

Commit bb8637f

Browse files
committed
add gist
1 parent 3f6f12f commit bb8637f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

content/post/Lua/lua和luarocks环境配置.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,11 @@ luarocks提供了一个命令来设置环境变量, 不过也挺sb的,比bash
116116
通过`install.bat`安装的目录下都包含`luarocks.bat`,这样如果都加到环境变量里会有冲突,可以酌情改成`luarocks51.bat``luarocks53.bat`
117117
### Powershell设置(可选)
118118

119-
具体可以看powershell的配置文件[Microsoft.PowerShell_profile.ps1](https://github.com/BlurryLight/dotfiles/blob/master/Microsoft.PowerShell_profile.ps1)
120-
我从[posh的脚本库](https://github.com/majkinetor/posh/blob/master/MM_Admin/Invoke-Environment.ps1)拿了个脚本,可以从`powershell`里调用`bat`从而设置环境变量。
119+
具体可以看powershell的配置文件
120+
121+
<script src="https://gist.github.com/BlurryLight/b94fad8b8a95ce147894055be45b7954.js"></script>
122+
123+
我从[majkinetor的posh脚本库](https://github.com/majkinetor/posh/blob/master/MM_Admin/Invoke-Environment.ps1)拿了个脚本,可以从`powershell`里调用`bat`从而设置环境变量。
121124
通过设置`alias`,注意要设置`Scope`以使得alias在函数外生效,以使得`lua``luarocks`指向不同版本的lua。
122125
注意不同lua的`bin`目录下也要加入到环境变量下,不然可能会找不到对应的`lua.exe`
123126

0 commit comments

Comments
 (0)