You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we are storing the version file inside the user home, when we use sudo location changes. Thatswhy we are getting different outputs for ballerina -v andballerina dist list.
When we issue without sudo user.home will be /home/suganya/.ballerina/ballerina-version
with sudo /root/.ballerina/ballerina-version
In Ubuntu-16.04, ballerina -v shows the correct version without sudo.
suganya@suganya-VirtualBox:~$ sudo ballerina dist pull slp5
[sudo] password for suganya:
Fetching the 'slp5' distribution from the remote server...
Downloading slp5 100% [======================] 297/297 MB (0:01:58 / 0:00:00)
Fetching the dependencies for 'slp5' from the remote server...
Dependency 'jdk-11.0.8+10-jre' is already available locally
'slp5' successfully set as the active distribution
suganya@suganya-VirtualBox:~$
suganya@suganya-VirtualBox:~$
suganya@suganya-VirtualBox:~$ ballerina -v
Ballerina Swan Lake Preview 5
Language specification v2020-09-22
Update Tool 0.8.10
suganya@suganya-VirtualBox:~$
However, in Ubuntu-20.10, we have to use sudo to get the correct version.
suganya@suganya-VirtualBox:~$ sudo ballerina dist pull jballerina-1.2.3
Fetching the 'jballerina-1.2.3' distribution from the remote server...
Downloading jballerina-1.2.3 100% [==========] 104/104 MB (0:00:43 / 0:00:00)
'jballerina-1.2.3' successfully set as the active distribution
suganya@suganya-VirtualBox:~$
suganya@suganya-VirtualBox:~$
suganya@suganya-VirtualBox:~$
suganya@suganya-VirtualBox:~$
suganya@suganya-VirtualBox:~$ ballerina -v
jBallerina 1.1.0
Language specification 2019R3
Ballerina tool 0.8.0
suganya@suganya-VirtualBox:~$ sudo ballerina -v
jBallerina 1.2.3
Language specification 2020R1
Ballerina tool 0.8.0
Description:
ballerina dist pull
does not set the active distribution properly in Ubuntu. Please refer to the below screenshot.sudo ballerina run test.bal
or set the distribution manually withballerina dist use slp7
and then run withballerina run test.bal
OS, DB, other environment details and versions:
Similar Issues:
#15
The text was updated successfully, but these errors were encountered: