Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
796d3d89
Commit
796d3d89
authored
Jul 25, 2018
by
Cristian Maglie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed duplicate ArduinoHomeFolder in configs
parent
0840d03c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
8 deletions
+5
-8
arduino/sketches/sketches.go
arduino/sketches/sketches.go
+1
-1
commands/commands_test.go
commands/commands_test.go
+1
-1
commands/sketch/new.go
commands/sketch/new.go
+1
-1
commands/sketch/sync.go
commands/sketch/sync.go
+1
-1
configs/directories.go
configs/directories.go
+1
-4
No files found.
arduino/sketches/sketches.go
View file @
796d3d89
...
...
@@ -53,7 +53,7 @@ type BoardMetadata struct {
// NewSketchFromCurrentSketchbook loads a sketch from the sketchbook
func
NewSketchFromCurrentSketchbook
(
name
string
)
(
*
sketches
.
Sketch
,
error
)
{
sketchbookLocation
,
err
:=
configs
.
ArduinoHome
Folder
.
Get
()
sketchbookLocation
,
err
:=
configs
.
Sketchbook
Folder
.
Get
()
if
err
!=
nil
{
return
nil
,
err
}
...
...
commands/commands_test.go
View file @
796d3d89
...
...
@@ -156,7 +156,7 @@ func TestLibDownloadAndInstall(t *testing.T) {
tmpSketchbook
,
err
:=
paths
.
MkTempDir
(
""
,
"test"
)
require
.
NoError
(
t
,
err
,
"making temporary staging dir"
)
defer
tmpSketchbook
.
RemoveAll
()
configs
.
ArduinoHome
Folder
.
SetPath
(
tmpSketchbook
.
String
())
configs
.
Sketchbook
Folder
.
SetPath
(
tmpSketchbook
.
String
())
exitCode
,
d
:=
executeWithArgs
(
t
,
"core"
,
"update-index"
)
require
.
Zero
(
t
,
exitCode
,
"exit code"
)
...
...
commands/sketch/new.go
View file @
796d3d89
...
...
@@ -61,7 +61,7 @@ void loop() {
`
)
func
runNewCommand
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
sketchbook
,
err
:=
configs
.
ArduinoHome
Folder
.
Get
()
sketchbook
,
err
:=
configs
.
Sketchbook
Folder
.
Get
()
if
err
!=
nil
{
formatter
.
PrintError
(
err
,
"Cannot get sketchbook folder."
)
os
.
Exit
(
commands
.
ErrCoreConfig
)
...
...
commands/sketch/sync.go
View file @
796d3d89
...
...
@@ -80,7 +80,7 @@ var syncFlags struct {
func
runSyncCommand
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
logrus
.
Info
(
"Executing `arduino sketch sync`"
)
sketchbook
,
err
:=
configs
.
ArduinoHome
Folder
.
Get
()
sketchbook
,
err
:=
configs
.
Sketchbook
Folder
.
Get
()
if
err
!=
nil
{
formatter
.
PrintError
(
err
,
"Cannot get sketchbook folder."
)
os
.
Exit
(
commands
.
ErrCoreConfig
)
...
...
configs/directories.go
View file @
796d3d89
...
...
@@ -52,11 +52,8 @@ var ArduinoDataFolder = pathutils.NewPath("Arduino Data", getDefaultArduinoDataF
// SketchbookFolder represents the current root of the sketchbooks tree (defaulted to `$HOME/Arduino`).
var
SketchbookFolder
=
pathutils
.
NewPath
(
"Sketchbook"
,
getDefaultSketchbookFolder
,
true
)
// TODO: Remove either ArduinoHomeFolder or SketchbookFolder
var
ArduinoHomeFolder
=
SketchbookFolder
// LibrariesFolder is the default folder of downloaded libraries.
var
LibrariesFolder
=
pathutils
.
NewSubPath
(
"libraries"
,
ArduinoHome
Folder
,
"libraries"
,
true
)
var
LibrariesFolder
=
pathutils
.
NewSubPath
(
"libraries"
,
Sketchbook
Folder
,
"libraries"
,
true
)
// PackagesFolder is the default folder of downloaded packages.
var
PackagesFolder
=
pathutils
.
NewSubPath
(
"packages"
,
ArduinoDataFolder
,
"packages"
,
true
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment