Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Transformerlab App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
TransformerLab
Transformerlab App
Commits
0c1e4fb1
Commit
0c1e4fb1
authored
1 year ago
by
ali asaria
Browse files
Options
Downloads
Patches
Plain Diff
fix 0.2.2 version of app to handle bash properly
parent
5243f363
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/util.ts
+10
-5
10 additions, 5 deletions
src/main/util.ts
with
10 additions
and
5 deletions
src/main/util.ts
+
10
−
5
View file @
0c1e4fb1
...
...
@@ -5,6 +5,7 @@ const fs = require('fs');
const
os
=
require
(
'
os
'
);
const
{
spawn
,
exec
,
ChildProcess
}
=
require
(
'
child_process
'
);
const
homeDir
=
os
.
homedir
();
const
tranformerlabHomeDir
=
path
.
join
(
homeDir
,
'
.transformerlab
'
);
const
transformerLabDir
=
path
.
join
(
homeDir
,
'
.transformerlab/src/
'
);
var
localServer
:
typeof
ChildProcess
=
null
;
...
...
@@ -45,7 +46,7 @@ export function startLocalServer() {
// The following two options allow it to keep running after parent is closed
detached
:
true
,
stdio
:
[
'
ignore
'
,
out
,
err
],
shell
:
true
,
shell
:
'
/bin/bash
'
,
};
console
.
log
(
'
Starting local server at
'
,
mainFile
);
localServer
=
spawn
(
'
bash
'
,
[
mainFile
],
options
);
...
...
@@ -73,12 +74,12 @@ export function startLocalServer() {
resolve
({
status
:
'
success
'
,
code
:
code
});
}
else
{
resolve
({
status
:
'
error
'
,
code
:
code
,
message
:
'
May be fixed by running ~/.transformerlab/src/init.sh
'
status
:
'
error
'
,
code
:
code
,
message
:
'
May be fixed by running ~/.transformerlab/src/init.sh
'
,
});
}
});
});
}
...
...
@@ -105,7 +106,11 @@ export function killLocalServer() {
export
function
installLocalServer
()
{
console
.
log
(
'
Installing local server
'
);
const
options
=
{
shell
:
'
/bin/sh
'
};
if
(
!
fs
.
existsSync
(
tranformerlabHomeDir
))
{
fs
.
mkdirSync
(
tranformerlabHomeDir
);
}
const
options
=
{
shell
:
'
/bin/sh
'
,
cwd
:
tranformerlabHomeDir
};
try
{
const
child
=
exec
(
'
curl https://raw.githubusercontent.com/transformerlab/transformerlab-api/main/download_and_install_remote_script.sh | sh
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment