Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
A
atbuild
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AnarchyTools
atbuild
Commits
361b47bd
Commit
361b47bd
authored
Aug 08, 2016
by
Drew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to Swift Preview 4
Fixes from SP3 commits for relative path calculation
parent
e4524c67
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
atpkg
atpkg
+1
-1
attools/src/Shell.swift
attools/src/Shell.swift
+1
-1
attools/src/Tools.swift
attools/src/Tools.swift
+7
-0
tests/fixtures/xcode_toolchain/test-3.swift
tests/fixtures/xcode_toolchain/test-3.swift
+1
-1
No files found.
atpkg
@
6fdd57f7
Subproject commit
79f5d1dc15017965216aaf5b905c2ca142dd7125
Subproject commit
6fdd57f7daa08b9ab19fced0392aeeb3edc87d9d
attools/src/Shell.swift
View file @
361b47bd
...
...
@@ -72,7 +72,7 @@ final class Shell : Tool {
environment
[
"ATBUILD_BIN_PATH"
]
=
binPath
.
description
environment
[
"PWD"
]
=
String
(
validatingUTF8
:
realpath
(
task
.
importedPath
.
description
,
nil
))
!
print
(
"pwd set to"
,
environment
[
"PWD"
])
print
(
"pwd set to"
,
environment
[
"PWD"
]
!
)
return
environment
}
func
run
(
task
:
Task
)
{
...
...
attools/src/Tools.swift
View file @
361b47bd
...
...
@@ -118,8 +118,15 @@ func anarchySystem(_ cmd: String, environment: [String: String]) {
let
args
:
[
String
]
=
[
"sh"
,
"-c"
,
cmd
]
let
argv
=
args
.
map
{
$0
.
withCString
(
strdup
)
}
let
env
:
[
UnsafeMutablePointer
<
CChar
>
?]
=
environment
.
map
{
"
\(
$0
.
0
)
=
\(
$0
.
1
)
"
.
withCString
(
strdup
)
}
let
directory
=
try!
FS
.
getWorkingDirectory
()
defer
{
try!
FS
.
changeWorkingDirectory
(
path
:
directory
)}
if
let
e
=
environment
[
"PWD"
]
{
try!
FS
.
changeWorkingDirectory
(
path
:
Path
(
environment
[
"PWD"
]
!
))
}
let
status
=
posix_spawn
(
&
pid
,
"/bin/sh"
,
nil
,
nil
,
argv
+
[
nil
],
env
+
[
nil
])
if
status
!=
0
{
fatalError
(
"spawn error
\(
status
)
"
)
}
...
...
tests/fixtures/xcode_toolchain/test-3.swift
View file @
361b47bd
//this is an error on Swift 2
//but "xcode-beta" currently ships swift 2.2
//so if we compile successfully, we used Xcode-beta compiler.
enum
E
:
ErrorProtocol
{}
\ No newline at end of file
enum
E
:
Error
{}
\ No newline at end of file
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