Skip to content

Commit

Permalink
Fix input issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Jun 18, 2024
1 parent 919b760 commit c7fdfd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion tools/edbconnect/edb-connect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ docker run --name $CONTAINER_NAME \
-v $VOLUME_NAME:/enclavedata \
--device $SGX_ENCLAVE_DEVICE:$SGX_ENCLAVE_DEVICE:rwm \
--device $SGX_PROVISION_DEVICE:$SGX_PROVISION_DEVICE:rwm \
$IMAGE_NAME $COMMAND
-it $IMAGE_NAME $COMMAND

# After the REPL exits, destroy the container
echo "Destroying the container ${CONTAINER_NAME} after command exits..."
Expand Down
23 changes: 2 additions & 21 deletions tools/edbconnect/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ func startREPL(db *sql.DB) {
query, err := reader.ReadString('\n')
if err != nil {
fmt.Println("Error reading user input:", err)
return
continue
}
fmt.Println("")

// Trim the newline character and surrounding whitespace
query = strings.TrimSpace(query)
Expand Down Expand Up @@ -163,23 +164,3 @@ func isPrintableString(data []byte) bool {
}
return true
}

//func main() {
// fmt.Println("Checking for existing EDB credentials...")
// file, found, err := edgelessdb.LoadCredentialsFromFile()
// if err != nil {
// fmt.Println("Error loading credentials from file:", err)
// panic(err)
// }
// if !found {
// panic("No existing EDB credentials found.")
// }
//
// credJson, err := json.Marshal(file)
// if err != nil {
// fmt.Println("Error loading credentials from file:", err)
// panic(err)
// }
// fmt.Println("Found existing EDB credentials in file:", credJson)
//
//}

0 comments on commit c7fdfd6

Please sign in to comment.