File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ For fish shell, instead use:
72
72
73
73
` source ~/.asdf/plugins/dotnet/set-dotnet-env.fish `
74
74
75
+ For xonsh shell, instead use:
76
+
77
+ ` source ~/.asdf/plugins/dotnet/set-dotnet-env.xsh `
78
+
75
79
# Contributing
76
80
77
81
Contributions of any kind welcome! See the [ contributing guide] ( contributing.md ) .
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env xonsh
2
+
3
+ def asdf_update_dotnet_home () -> None :
4
+ dotnet_path = $(asdf which dotnet ).rstrip ('\n ' )
5
+ if dotnet_path :
6
+ $DOTNET_ROOT = $(dirname $(realpath @(dotnet_path ))).rstrip ('\n ' )
7
+ dotnet_version = $(dotnet - - version ).rstrip ('\n ' )
8
+ $MSBuildSDKsPath = $DOTNET_ROOT + "/sdk/" + dotnet_version + "/Sdks"
9
+
10
+ @events .on_chdir
11
+ def update_dotnet_home_on_chdir (olddir , newdir , ** kw ) -> None :
12
+ asdf_update_dotnet_home ()
13
+
14
+ @events .on_post_init
15
+ def update_dotnet_home_on_post_init () -> None :
16
+ asdf_update_dotnet_home ()
You can’t perform that action at this time.
0 commit comments